There are three factors you need to judge when passing a car:
Speed, distance, and time. Sounds like math class, doesn't it?!
SpeedWhat is the speed you are traveling?
What is the speed that the car you are about to pass is traveling?
What speed are the approaching cars traveling? (that's tough to judge but you can make some safe assumptions)
DistanceWhat is the maximum distance you need in order to pass?
What is the distance you have between you and the approaching car?
TimeHow long will it take you to get up to speed to pass?
How long will it take you to pass?
How long will it take the approaching car to reach you?
These are a lot of things to think about... but you need to know the answers to them BEFORE you pass another car.