Weaving in and out of heavy traffic is dangerous and is usually done by inexperienced or aggressive drivers. When you are travelling in heavy traffic, stay in the same lane as much as possible.
When you have to change lanes, check your mirrors to make sure there is no traffic overtaking you. If it is safe, signal, check your mirror again and then turn your head and check over your shoulder before changing lanes. Checking over your shoulder is the only sure way to see a vehicle behind you in the next lane. This is particularly important because there is little chance a driver in the next lane can react quickly enough to avoid you once you have started to change lanes.
On a road with several lanes, check the far lanes as well as the one next to you. Another driver may be headed for the same space you are.