The WPML Flags widget only works when you have WPML installed. It is styled to fit the header widgets sidebar as well as all other sidebars.

The widget simply recognizes all the languages you have activated in your WPML settings and displays the flag for each of these.

Pretty neat, huh?