You have to practice. The biggest thing is to learn how to swing on a level plane with the ball angle and to be long throughout the strike zone. You can practice off of a tee hitting line drives which helps. Place the ball/tee in different locations in order to simulate different pitches. You can give yourself points for successful line drives and keep track throughout your practicing.
First of all Coach Frank has given some good information/ tee work and soft toss are great for establishing good swing mechanics. The only thing I might add is timing is everything when it comes to hitting and most players don't take advantage of their time in the dugout and the on deck circle to establish good timing. I have a old saying I use with my players/ from the dug out to the on deck circle, to the plate create a plan to hit that pitcher. Watch the tendencies of the pitchers from the dugout, does he start everyone with a fastball and if he get ahead does he go to his curve or change, have an idea of how he pitches so you'll know what's coming. Take your time in the on deck circle to establish his/her speed and set the timing by taking swings to establish his/her speed, when you get the plate you should have a plan to hit that pitcher, you have established how he/she pitches, their speed and then all you have to do is be ready to rip.