A cookie is a small text file that is stored on a user’s computer or device when they visit a website. It contains information about the user’s browsing activity and preferences, allowing the website to remember and personalize their experience. Cookies are commonly used for tracking, analytics, and targeted advertising purposes.