This chapter reviews the mathematical and computational modeling of situations of language contact in which there is competition between two languages, addressing the question of language coexistence versus language extinction or dominance. The focus lies on a socio-linguistic perspective in which social interactions are considered in the context of individual-based models. We examine the different components of these models, the different levels of approximations, and the underlying mechanisms which determine possible coexistence or extinction, including bilingual speakers. We consider the role of several sociolinguistic parameters such as language prestige, preference, volatility and inter-linguistic similarity. We also highlight the importance of the coupled dynamics of the preference and language use by individuals.