That's a MySQL command to signal which character set to use in communications with the client. Taken from the MySQL manual:
NAMES {'charset_name' | DEFAULT}
SET NAMES sets the three session system variables character_set_client, character_set_connection, and character_set_results to the given character set. Setting character_set_connection to charset_name also sets collation_connection to the default collation for charset_name. See Section 10.4, “Connection Character Sets and Collations”.
The default mapping can be restored by using a value of DEFAULT.
Note that the syntax for SET NAMES differs from that for setting most other options. This statement is available as of MySQL 4.1.0.