There are three main reasons someone 'tops' the ball. These being: staying on the back foot, unhinging the wrists too early and head movement,
The reason why staying on the back foot causes 'topping' is that when your weight stays back, the body reacts by hitting more up on the ball. This is especially prevalent for more beginner golfers as the inclination when you first start playing golf is to want to try and help the ball in the air by staying on the back foot rather than transferring your weight forward. Golf is truly a game of opposites as will feel at times that we are doing things against our instincts.
The best way to identify if you are going on the back foot is by of course video or noticing how you are positioned at the end of your swing. Often times with students who come to me and are working specifically on weight transfer, I will have them pause at the end of their swing. What you should feel when doing it correctly is 100% of pressure on your front foot as well having your chest, hips and back foot facing the target.
A great drill for transferring your weight is by hitting shots with your feet together and making sure you finish forward. By having your feet together, it reduces your ability to sway on the backswing and therefore putting your body into a position which enables you to consistently finish on your front foot. The more you sway on the backswing, the harder it is to have an efficient transfer of weight on the downswing.
The other aspect that causes 'topping' is head movement. You can have a very good swing with successful weight transfer but if your head moves up and down too much, you may not compress the golf ball properly. The best way to check if you are doing this would be video or you may be able to work this out when doing practice swing in front of a mirror so that you can see yourself. If your head raises early on the backswing and stays there until impact, you will definitely have an inclination to hit higher on the ball.
The most common head movement that causes 'topping' is when the head moves down too early on the backswing and thus causes a reaction with the body that makes the head come up on the downswing. The most effective way to solve your head movement is mirror work. I recommend watching yourself swing in front of the mirror whilst monitoring your head. Your head should be nice and level with little movement side to side on the backswing and then on the downswing the head can come down a little whilst making contact with the ball.
The key to changing anything in the golf swing is putting yourself in a state of mind as if you are actually going to hit a shot. Therefore when making a practice swing in front of the mirror, you should set-up as if you are going to hit a shot and then make the swing. After one mirror swing, you should then look down and make a normal swing simulating what you just felt with your head. Just alternate between looking in the mirror and looking down until you feel your head has changed. Also when making practice swings on the grass or mat, ensure you are always skimming the mat. This will ensure that you are hitting down on the ball and not trying to hit up on the ball.
Lastly 'topping' is caused by unhinging your wrists too early on the downswing. The effect of unhinging your wrists too early on the downswing is that your hands end up being behind the clubface at impact. When the hands are behind the clubface at impact, it will naturally cause a reaction again and make you hit high on the ball. It's very important that once you hinge your wrists to 90 degrees on the backswing, that you maintain this wrist hinge right up until you hands are opposite your left leg. Once they are opposite your left leg, you can then release the club through the ball.
The best drill I use for my students to ensure they keep their hands in front of the clubface at impact is by practicing 'punch' shots (low shots). When hitting low shots just try and swing half way back and ensure that when going through impact, your hands win the race to the ball. I will often have the student exaggerate the feel by trying to hit the ball as low as possible with a 9 iron. The more forward the hands are at impact, the lower the ball will go. This will also ensure that you stop hitting up on the ball.
If you have any queries about the above reasons, please don't hesitate to contact me.