Just to add to the above, avert is almost always used when speaking about your eyes and looking away.
Its very rare to hear it used in other situations.
Avert is physically doing something like, moving your eyes to look away or turning your car sharply so you don't drive into another car.
Avoid is the result of this physical action; so you would avert your eyes to avoid looking at something.
Using avert except from talking about your eyes is rare, instead we would say
I swerved to avoid hitting the car
I took a different route to avoid the traffic.
I hope that is clear, English can be hard to explain sometimes. There is so many different ways to say the same thing it is confusing sometimes.
Paul