Cookies are small text files that websites place on your device when you visit them. Think of them as little notes that help websites remember things about you — like your preferences or what you put in your cart.
They're not programs and can't carry viruses. Most websites use them because they make the web work better. Without cookies, you'd have to log in every time you clicked a new page, and sites wouldn't remember anything about your visit.