Cookies are small text files which are downloaded when you visit a website or application. Your browser can read these files and in some cases remember your preferences, e.g. which content to display on the screen.
Cookies are not programs and so can't contain a virus. They are stored in .txt format so you can open them with Notepad or any other text editor. They usually contain two pieces of information - a site name and a unique user ID.