Sociolinguistics is a branch of linguistics. Linguistics is the study of language and its structure. Sociolinguistics is thus the study of language with regard to social factors. Gender, region, religion, ethnicity, dialect, culture and many other social factors that affect languages and their structure are perused in sociolinguistics. To be precise, it is actually the study of the effect of society on language. William Labov is considered as the father of sociolinguistics.
There are many applications to sociolinguistics. Study of social attitudes may help a sociolinguist to determine if a particular vernacular may be the appropriate professional language. When different varieties of the same language is used in different social situations, sociolinguists call it code-switching. There are different concepts in the study like speech communities, high/low prestige varieties, languages in social networks, class difference etc.
Taken in simple words, sociolinguistics help one understand the difference when the same language is used in different realms of the society. For eg., the difference between Canadian French and France French; the difference in the dialect of Hindi spoken in various regions of India; the difference of Arabic used in Egypt and Jordan etc.