Now that you have very good understanding of how cookies work, let us move to the next functionality of cookies - saving user preferences.
I will illustrate this feature using a very good example. Even if you are a new to using internet, you would have heard about the website called YouTube.com. The first time you visit YouTube.com you will see the thumbnails for a few videos. After you watch a few videos and again visit enter the URL as YouTube.com, you will notice that there will be a few links to the videos that might be of your taste.
What YouTube does is, it keeps track of the videos that you watch. This details of the videos that you watch is sent to the server via the cookies stored on your computer. When you visit YouTube's home page, YouTube performs an analysis of the cookies and displays you links to the videos that you might be interested to watch.
You can try something similar on google.com, bing.com, etc by changing the default language. When you visit those websites again, you will see that the pages are displayed in the language that you selected to be your default choice.
Another great example iGoogle. It is probably the example that you can find on the internet. Play with them and you will understand how cookies work. Apart from saving data, customization is the next great functionality for which the cookies are used.
Image Credit: Mindmatrix - Wikipedia