Updated Feb, 10th 2013
We are all familiar with Facebook Like, but how does it work?
In order for you to "Like" a page, comment or status, you will first need to have a Facebook account. 1. Type Facebook.com into the URL ( which is associated with an IP address and it'll find the DNS and bring you to the homepage.)
2. Click Sign up and create a password. (the back end using a data language like PHP, Java etc. and being stored into a table of data so it can allow you to Sign In later. Looking up your corresponding username and password with a SQL.)
EX: Facebook Status/Comment Like
The following 2 examples are companies that intergrated Facebook Like to their website. IF you have not, Like a page it would be shown to you as a blue buttom and your friends who have (assuming you are already signed into your Facebook account):
When you do click Like, it turns grey showing you have liked it and even more complex and fancier with a comment box. Then it also shows up in your recent activity feed on Facebook.
All this is made possible through the back end and data being exchanged between Facebook (your profile), the company's FB fanpage and the company's site database servers. (complex SQL?) There is also a slight change in the graphics on the front end of the site as now you can see your profile thumbnail alongside your friends and the comment box (if there is one).
To "unlike" simply click on the Like buttom. (And this action would be processed through a query between 2 servers (Facebook and the Company) and stored somewhere on a database.)