The use of cookies is defined in
RFC 2109, but this is a bit of a heavy read.
THe data in a cookie is stored as a name/value pair, and the way this data is represented is decided by the person who writes the cookie - ie the server.
Usually they are Base64 encoded, but they can also be encrypted if the data is sensetive.
Dave