Sociolinguistics is a term including the aspects of linguistics applied toward the connections between language and society, and the way we use it in different social situations. It ranges from the study of the wide variety of dialects across a given region down to the analysis between the way men and women speak to one another. Sociolinguistics often shows us the humorous realities of human speech and how a dialect of a given language can often describe the age, sex, and social class of the speaker; it codes the social function of a language.
Sociolinguistics is the study of the effect of any and all aspects of society, including cultural norms, expectations, and context, on the way language is used. Sociolinguistics overlaps to a considerable degree with pragmatics. It also studies how "lects" differ between groups separated by certain socia variables, e.g., ethnicity, religion, status, gender, level of education, age, etc., and how creation and adherence to these rules is used to categorize individuals in social class or socio-economic classes. As the usage of a language varies from place to place (dialect), language usage varies among social classes, and it is these "sociolects" that sociolinguistics studies.