Cookies are a way that websites can track your usage by sending a small amount of information to your browser's cookie jar.
When you log into Facebook with a web browser, Facebook saves some information about you logging in from that computer (called your session) into the cookie jar, and when you log out, that information is deleted.
Also, companies like Amazon store more than just your login information in a cookie, they also store information that tells them what products you have looked at and placed in your wish list or shopping cart.
Actually, advertising companies are so connected now that they can see what you have searched for (from Google's cookies), what you have looked at or bought from Amazon and place targeted adverts on Facebook.
Cookies are a good thing for people who need to log into websites, such as Gmail or Facebook, but are bad because everything you do is being targeted by advertising companies.