Card sorting is a technique used to determine how users categorize information on a website. It involves writing content topics on index cards and having users sort them into logical groups. There are two main types: open card sorting, where users create their own groups, and closed sorting, where they assign cards to pre-set groups. Observing how users sort cards provides insights into their mental models and can help inform the information architecture of a website.