Cookie is a name/value pair sent to the client browser from the server side application.
The cookie are meant to be saved in the client browser.
Every time the user sends a subsequent request to the same server, the browser sends the previously saved cookie back to the server to notify the user's previous activity.
Cookies are a way to overcome the statelessness of HTTP protocol.
There are mainly two kind of Cookies:
Session cookie: exists only in temporary memory while the user navigates the website. Web browsers normally delete session cookies when the user closes the browser.
Persistent cookie: expires at a specific date or after a specific length of time.