How are viruses weakened to be suitable for vaccination?
There is a Wikipedia page on the topic of attenuated vaccines. 

Basically the idea is that the virus is grown on some sort of foreign host such as cells in culture, eggs or an animal. This selects for mutant viruses, present in the original population, which are pre-adapted to the new host (so that they grow better). By repeating this process several times it is possible to develop a new variant of the virus which grows poorly in the original host (i.e. humans) but is still able to stimulate an immune response. The resulting antibodies, will recognise a subsequent infection by the original disease-causing virus as long as the viral component responsible for the immune response is still present in the attenuated virus that is used for vaccination.