How does the alter command work internally when adding a column? Can anyone explain what the internal operations are that takes place when an alter command is issued? How is column modified? Does it use created_tmp_tables or created_tmp_files?

As per my test, I created a table and with the alter command I added a column. After checking the created_tmp_file status variable, it increased by 3.

Can someone explain how this alter command works internally?
See the ALTER TABLE docs here:

http://dev.mysql.com/doc/refman/5.6/en/alter-table.html

"In most cases, ALTER TABLE makes a temporary copy of the original table."