While snakes are typically not a danger to humans, some are venomous and if you get in their way, your life is in danger.
General advice is to never try to pick up, harm, or kill a snake. If you see a snake, just move on or call in a professional snake catcher to move the animal. A lot of people are bitten when attempting to handle snakes.
Killing snakes is just mean and largely pointless - snakes can be beneficial to people as many of them eat rodents (such as rats and mice) and even other snakes. In some places, such as the United Kingdom and Australia, it is also illegal to kill most species of snake. If you really, really have to kill a snake, the only humane method (outside of a vet putting the animal to sleep) is to destroy the brain (in a snake, it sits in the skull behind the eyes). Other methods, including decapitation, are likely to cause extreme suffering to the animal and a venomous snake can still deliver a envenomed bite even when "dead".
If you plan on hiking in rural areas that are known habitats of venomous snakes, learn what they look like. Also, pay attention to where you put your feet; a snake that gets stepped on is very likely to bite, but if you keep your distance the risk is far lower. Heavy boots provide considerable protection for the area most likely to be bitten. For some species you can carry an anti-venom drug, but for others no such drug is available. If you are bitten by a highly venomous snake, get help as soon as possible, as you may need to receive an antidote quickly to stay alive.
Rattlesnakes - These 32 New World species have a "rattle" on the end of their tails used as a warning when they feel threatened. Rattlesnakes range from southern Alberta and southern British Columbia in Canada all the way to Argentina, but the largest concentration and widest variety of rattlesnakes is found in the American Southwest, Texas, and Northern Mexico, where hikers should remain vigilant and avoid hiking alone in remote areas. Rattlesnakes are the leading cause of snakebite injuries in North America, though their venom is rarely fatal if treated promptly. If you do encounter one, it is best to freeze and back away as slowly as possible.
Cobras live in the rainforests of South and Southeast Asia, and also in Egypt, where they are known as asps. While they probably won't attack you unless you accidentally step on them or they otherwise feel angry at or threatened by you, they must be respected because, as Cleopatra knew, a cobra bite can be fatal.
Mambas are native to tropical Africa, related to cobras and also very venomous. The most famous is the black mamba, one of the fastest and most aggressive snakes in the world, featured in many local legends and stories; an untreated bite from this one is often fatal within hours.
The common viper or common adder lives in northern Eurasia, from Britain to East Asia. Together with its relative Vipera aspis living in Mediterranean Europe, they are the only venomous snakes in Europe. While a bite from these isn't as life-threatening as from the other snakes on this list, you should always see a doctor if you get bitten.
Australia has the unfortunate distinction of having more venomous snake species than any other continent, and most tropical areas and some temperate areas have some very dangerous species. The most important defense is to do some quick research before going into any area where there is risk of a fatal snakebite, and pay attention to what they tell you. The most important thing you need to remember is that most of these snakes will do their own thing and leave you alone – they are more afraid of you than you are of them. Leave them alone and you'll be fine.
Brown snakes, including the eastern brown snake and king brown snake, are found across Australia. Despite their name, they can vary in colour from pale brown to black and even grey and gold. They are known for their speed and aggression, but prefer to flee from confrontations unless provoked.
Taipans live in an area from central Australia to Papua New Guinea and comprise the most venomous snakes in the world; a bite from the inland taipan is theoretically capable of killing a healthy adult in just half an hour. Taipans are however rather shy and prefer to live away from populated areas, therefore bites from them are rare.
Tiger snakes are found in southern Australia and Tasmania. There are various colour morphs depending on their locale, so knowing how to identify just one local pattern is not useful if you travel outside that area. Their venom is dangerous causing a 40-60% mortality rate in untreated victims, but widespread anti-venom availability has reduced fatalities.
It's usually impossible to discern whether a snakebite is venomous by the shape of the bite or the snake, unless you can recognize the specific species. Treat any snakebite as fatally dangerous unless you're certain it's not.
Most field-treatments presented in pop culture are no good. Trying to suck out the venom by mouth was proven largely ineffective, and can even be dangerous to the one performing it if there are any wounds inside his mouth. Tourniquets are actually likely to cause severe damage to the local area of the bite, as the venom would become very concentrated there. Making a cut above the bite to try and drain out the venom can also do more harm than good.
Your best chances are to get the victim professional medical aid, and prevent deterioration until then. The victim must rest as completely and comfortably as possible in order to slow circulation and distribution of the venom. Try to make the victim as calm as possible, despite the circumstances, for the same reason. The bitten body part should be placed lower than the rest of the body. If possible, set it using strong branches or the like, so it moves as little as possible. There also exist venom suction pumps which are considered more effective than sucking with the mouth, but studies show that their effects are apparently also negligible. If you have one, use it if you have time, but don't let it delay the victim's evacuation.
Taking a photo of the snake could be very helpful for the doctors. No need to actually catch or kill the snake; it's not like they can or need to produce anti-venom on the spot. They only need to be able to recognize the species to know what anti-venom and other treatments to apply.