Pack position throughout a race has a huge influence on final race result. The type of positioning that will work best for a specific racer doesn't always work for another, but there are some basics that generally apply to everyone.
PARTS OF THE PELOTON:
IN THE WIND These are the first few racers. There are a number of reasons racers will be on the front. By accident. Because they're trying to pull back a break. They're bored and want to stretch their legs. They're bored and want to try and make the pace difficult (though the guys in the back of the peloton will still be chatting while someone is killing themselves on the front). Or it's just that guy who can never help himself and always get on the front.
THE FRONT These are the positions around 4-12 back. This is where you want to stay, around 8th wheel. This is where you are far enough back to get a good draft, and far enough forward that you don't have to fight (as much) to keep your position.
THE MIDDLE The middle of the peloton is made up of two main parts. The guys towards the front of the middle are fighting to get into the sweet spot of 6-10th position. This is also where there's usually a "traffic jam" and it's difficult to move up because racers are taking up the entire road. It's probably the most stressful place in the peloton. Then there are the guys towards the back of the middle, and they are too far back to do anything. If the peloton starts going up a hill, gets a little strung out, and 25th wheel can't keep the pace, the peloton will split and that's the end of the race for the back of the middle. That said, some people (especially big sprinters) sometimes like staying back there because there's also the most draft, and you can stay very rested.
THE BACK In a small peloton of 10-15 racers the back can actually be a pretty pleasant place. You can eat, drink, blow your nose, and not worry much about holding your line. In a large peloton it is the worst place to be. In the back you have to sprint out of every corner, and when racers start getting dropped you have to navigate your way around them. In a technical crit, if you're in the back your race is pretty much over - you'll get yo-yoed off the back no matter how strong you are.
START IN THE FRONT
This always made sense to me. If you start in the back, you have to go through the peloton at some point if you want to get a good result, and that takes extra energy. Why do it? Start where you want to be, and it's much easier to defend that position than to have to claw your way up to it from the back.
In a crit this is even more critical. If you start in the back, you're going to have to sprint out of every corner just to hold onto the wheel in front of you. If you can finish the race, it's unlikely that you'll have the legs to do much damage.
ALWAYS BE MOVING FORWARD
Another way to say it is if you're not moving forward, you're moving backwards. It's not like a group ride where everyone sorta finds a wheel and sits on it for a while. There's a constant flow of people moving forward. If you're not moving forward, at some point you'll notice that no one seems to be fighting for the wheel in front of you ... because you're in the very back.
FIGHT FOR YOUR WHEEL
You can tell when someone is going to try and take the wheel in front of you - make sure you stay close to that wheel and don't let them take it from you. If you let racers take your wheels, you'll soon find yourself in the very back. A bike race is not the place to be polite and allow people to get out of the wind and take your wheel. Unless you're in 4th position. Then sure, take my wheel and give me some extra draft!
Always be looking for places and times to move up. Is the guy in front of you about to start eating a bar or gel? He'll drop the wheel in front of him a bit, so go and take it. Is the peloton slowing because no one is pulling on the front? Take advantage of that and move up before the peloton gets bunched up. See an opening on the side of the peloton? Start moving up it.
THE END OF THE RACE
About one or two miles from the finish of a race I get serious about moving up. I try and get serious about it before anyone else does. The closer to the finish, the more and more racers will realize it is time to get to the front for a decent result. At a certain point it will become close to impossible to move up.
Sometimes it takes an effort or two in order to get into position, which can be difficult if the pace ramps up. Every chance to move up in that final 500m without blowing up can be good. The worst thing that can happen is getting blocked in, or being so far back that you're really only going for 18th place.
So, your position can make you have a poor result, and a good position can launch you into a great result if you have the fitness. Tactics at the end of the race depend on the course and the specific racer, but the other generalities above are true for most of us.