Silly web programmers try to make different pages for users of different browsers to make them look the best possible for their particular browsers. They usually also do different kinds of javascript, vbscript etc. At times, you will see that getting a page with curl will not return the same page that you see when getting the page with your browser. Then you know it is time to set the User Agent field to fool the server into thinking you're one of those browsers. Curl will only use POST in the first request, and then revert to GET in the following operations.
Cookies are just names with associated contents.
The cookies are sent to the client by the server. The server tells the client for what path and host name it wants the cookie sent back, and it also sends an expiration date and a few more properties. When a client communicates with a server with a name and path as previously specified in a received cookie, the client sends back the cookies and their contents to the server, unless of course they are expired. Many applications and servers use this method to connect a series of requests into a single logical session. To be able to use curl in such occations, we must be able to record and send back cookies the way the web application expects them.