In Minecraft, I often find myself being ambushed by hostile mobs as the sun starts to set, especially when I'm far away from my base. What is the most effective way to escape from monsters/hostile mobs in Minecraft?
I am usually able to escape monsters quickly and easily by carrying boats with me, and staying close to the shore whenever possible. This allows me to make a quick getaway from monsters whenever they get close, since the boats let me travel much faster than running or walking, and consume no hunger either. Boats also can move much faster than any hostile mob, which makes it easy to outrun them.
Double pressing the 'forward' key to sprint should give any mob a hard time trying to catch you, even an angry Enderman. Looking at @Jame's answer here, you can see that every mob has a 16 block radius, so you just need to sprint for about five seconds to stop being chased by that mob. Also, if you are in a tight space, you can punch the mob. Don't be afraid to move up, just keep hitting it until it is dead. You could dig a 1 by 3 hole down, and then cover up the block above your head. This will keep you safe until morning. Alternatively, you can always carry a bed with you, and skip the night that way (instead of waiting until morning).
If it's not a spider or a skeleton, or if they're far enough away, you could always escape from above by building a tower out of a stack of dirt.
This is most effective against zombies, endermen, further-away skeletons, Zombie Pigmen, and other ground-bound mobs. Once safely in the air and out of reach, you can build a bridge away from the mob.
Alternate Strategy: Drop some water at your feet and run in the opposite direction. Mobs are absolutely terrible at navigating water. This of course requires a bucket of water, but can save you in a pinch if your weapons are all busted.
If you are in single player mode, use a bed. Always carry a bed with you. When it gets dark, place the bed, and sleep. Then you miss the night, and all the monster fun, and can get on with work in the morning.
Sometimes it is difficult to build or dig when you're being chased by mobs, so I think the best option is to just run. If you're being chased by mobs such as zombies or creepers, it's easy to outdistance them. Just sprint and jump. If you have no food, then walk away as fast as you can. Even walking, you can outrun a creeper or a zombie.
If you're dealing with a skeleton in the mix, quickly place four to two blocks behind you to hinder the arrows. Then just turn, and run (once again, just walk if you have no sprint). If you're near water, a boat is the best.
This might be unlikely, but if you have a dog with you it can do the job itself. Just try to run away - and if you are hit, the dog will attack your attacker.
Another option - if it's day and you are in shade with the mobs, you can run into sunlight. The zombies and skeletons will burn, and endermen might become distracted, though they don't burn in sunlight. Spiders may turn passive, and though creepers are unaffected by sunlight, as mentioned before you can easily run from those.
Hope this helped!