Sociolinguistics is a subfield of linguistics that examines the relationship between language and society, focusing on how social factors, such as ethnicity, gender, age, and social class, influence language use and variation.