Some families of Diophantine equations, such as quadratic forms, have a very useful property: if an equation has solutions in the real numbers and in each p-adic field, then it has a rational solution. Such families of equations are said to satisfy the Hasse principle. In general the Hasse principle does not hold, but many violations are described by the so-called Brauer-Manin obstruction. This obstruction was first defined by Manin and is based on the Brauer group of the variety. I will talk about how to compute the Brauer-Manin obstruction for certain classes of varieties, using many ingredients from algebraic geometry and number theory.