I was driving from Phoenix to Kingman, one evening, on one of the most dangerous stretches of highway in Arizona. I was passed -- across double yellow lines -- by a delivery truck (similar to a large U-Haul or Ryder rental truck). I was doing the speed limit, or close to it. He passed in the face of oncoming traffic, at considerable risk to both of us and to others as well. When we both arrived in Kingman a couple of hours later, he wasn't more than ¼ mile ahead. I'll bet you've seen similar occurrences.
A normal pass at highway speed can easily devour 1,500 feet of asphalt or more. In many places, whether passing is legal or not, there isn't that much visual range, because of rolling terrain or curves. While you are covering that 1,500 feet, you can assume that oncoming vehicles are also closing on you at nearly the same velocity, resulting in a closing speed near 200 feet per second -- about 140 mph. That 1/3 mile of passing distance can be covered by two opposing vehicles in less than 9 seconds -- and a normal highway pass takes approximately 15 seconds (time them yourself if you don't believe me!). Think about that!
So what's my point? First, consider whether you really need to pass at all. I think it is often a much wiser thing to do to consider how fast that guy ahead of you is going, and if he's close to your speed already, even if he's traveling a bit slower, then the smart thing to do is back off, maintain a safe following distance (3 or 4 seconds is great) and match his speed. Clearly, that would have been the smartest thing to do for that truck driver on the road to Kingman. We get caught up in the notion that somehow we're not "top dog" if we're not leading the pack, and we're willing to take chances to stay out there. I'll leave it to you whether that truly makes any sense.
If you decide you do need to pass, visually clear the road ahead and behind (others may be passing YOU). Make sure you have enough clear road ahead to pass without interfering with oncoming vehicles. Make sure passing is legal. Do not tailgate prior to passing -- maintain your following distance so you can see what's ahead. Don't speed while passing -- if you have to speed to pass someone, then there isn't any need to pass (and it is illegal). Finally, make sure you give the overtaken vehicle enough clearance when returning to your lane -- you should be able to see the front of the vehicle and its tires on the pavement in your mirrors. If you don't, the lane marker "bumps" can dislodge little rocks from your tires and break his windshield. He won't be happy about this.
Finally, remember that not all no-passing zones are always marked with solid yellow stripes or signs -- there are places where you are expected to know that passing is not allowed; some of these are near hill crests, approaching bridges, approaching intersections, etc.