A cookie, also known as a web cookie, browser cookie, and HTTP cookie, is a text string stored by a user's web browser. A cookie consists of one or more name-value pairs containing bits of information, which may be encrypted for information privacy and data security purposes.
The cookie is sent as an HTTP header by a web server to a web browser and then sent back unchanged by the browser each time it accesses that server. A cookie can be used for authentication, session tracking (state maintenance), storing site preferences, shopping cart contents, the identifier for a server-based session, or anything else that can be accomplished through storing textual data. ( This is given in http://en.wikipedia.org/wiki/HTTP_cookie you can refer this if you need further information about cookies)
And testing a cookie is something like, when i login to a session the username and password are encrypted and stored in a cookie.
So once we can login and can visit to any pages and check for the information, you can notice the session not expiring.
But in the middle if you delete the cookies and click on the web page you will notice that the session expired, and this is one scenario where you do the tests based on the cookies.
The cookie testing you can see its significance in shopping cart testing.
There are many such scenario's which you can explore.