May not be the right forum to ask in, but i'll answer (may want to just google "how do browser cookies work"
https://en.wikipedia.org/wiki/HTTP_cookie
Long story short, cookies are just name-value paired pieces of data that are stored in your browser and sent to the sites that set them, so the server has context of who you are and what you are doing. If you visit a .net site it adds a Session cookie that when you visit that site it can pull up your session information (such as that you are logged in, what you were looking for in a shopping cart, etc).