Here's the good news about rattlesnakes: They're more afraid of you than you are of them. If they see you coming, they'll probably run and hide. The bad news is: It's fairly easy to sneak up on them.
A frightened rattlesnake will probably just give you a little "love bite" to warn you away. You've no doubt heard that rattlesnakes are venomous and that's absolutely true, but the rattlesnake can decide just how much venom to give you along with a bite, much as a doctor can decide how much medicine to inject from a hypodermic. If the snake isn't angry, it might not inject any venom at all. On the other hand, if you've stomped on it with the corrugated soles of your hiking boots, it may decide it wants to give you a lesson you'll never forget.
Rattlesnake venom can take anywhere from 6 to 48 hours to kill the victim, so whip out your phone, call 911, and see if the local emergency response team can send an ambulance (or, better yet, a helicopter) to get you some antivenin medicine immediately. And, if it makes you feel better while you're waiting for the medtechs to arrive, remind yourself that thousands of people are bitten by venomous snakes each year and only about five die. But get on that phone fast (or have someone drive you to the nearest doctor) anyway. You don't want to be one of those five.