To divert vehicles or travellers means to make them follow a different route or go to a different destination than they originally intended. You can also say that someone or something diverts from a particular route or to a particular place.
If you say that someone diverts your attention from something important or serious, you disapprove of them behaving or talking in a way that stops you thinking about it.