A binary variable is a type of categorical variable that has exactly two distinct possible values, often represented numerically as 0 and 1. It is commonly used in statistical modeling and data analysis to represent outcomes, presence or absence of a characteristic, or yes/no responses.