Let’s say that the pitcher throw’s a ball at 90mph. It takes the ball approximately .4 seconds to reach the batter. The batter needs about .2 seconds to think and decide about that pitch. He needs to decide whether or not he is going to try and hit that ball. The batter also needs about .15 seconds to swing at that ball. And if the ball is a curve ball, that break in that curve ball happens in the last .10 sec of that pitch. This is where the curve ball would drop right under that bat as the batter swings.
If the batter misestimates the speed of the pitch by 1.5mph then his swing would be early or late by 1 foot of the ball. And the elevation can misjudged by 1 inch. A bats thickness is only 2-3inches and loosing an inch can cause you to miss the ball. It's amazing that baseball players like Babe Ruth had such success.
When the pitcher throws his ball, backspin helps out a lot. By placing some backspin on the ball it allows the ball not to sink or if the pitcher places less back spin on the ball it allows it to drop more because gravity has more time to act on the ball. This is a factor in how a curve ball works.
At the instant that the ball hits the bat you have a collision with very large forces. If the ball is going 90 mph and the batter swings at 70 mph then the total relative speed of the ball is 160 mph. So as that ball gets closer to the bat it has a lot of kinetic energy then switches into potential and then back into kinetic. But what happened exactly?
You can think of the ball like a spring. The ball comes into the bat, compresses against the bat and then the ball changes direction and expands back into its original shape. The forces that act on that bat are in the range of 6,000-10,000lbs and happened in the time span of 1/1000 of a second. This is a very violent collision. That is also why in the major leagues a baseball is used for an average of 4-5 pitches. Every time a ball is hit it gets deformed from all the force that is applied to it. The ball actually compresses to about an inch. In this process a lot of energy is lost. It is lost into the form of heat, friction, sound and vibrations. These vibrations are also known to have broken bats. When the ball collides in the areas that cause more vibrations, the batter will know! These vibrations cause a stinging sensation, however if the batter hits the ball right in the sweet spot, located about 5 inches in from the bat, then less or no vibrations are caused and more energy goes into the ball causing it go a further distance.
When the ball hits the bat the bat recoils. If the bat recoils then energy is lost into making the ball go further then it would have. Having a heavier bat causes less recoil. Why not have a really heavy bat? Because you need to swing the bat and a faster bat speed causes the ball to go farther.
What makes it go so far? Basically it is the speed of the bat. The speed of the ball is a factor as well but not as much as the speed of the bat. The weight distribution as well as the weight of the bat matters. The heavier the bat the more bounciness the ball will have, also known as the Coefficient Of Restitution (COR). The COR of a base ball is measured at .5. This means that if you were to drop that ball on a hard surface the ball would bounce back up ¼ the distance it left at.