Pruning is the removal of dead or unneeded branches to encourage the growth of flowers. Usually a tree will end up devoting energy to branches that don't need it, while neglecting branches which are bearing more fruit. If you remove the branches that are taking all the nutrients, you will begin to see a flourish in the other ones. Pruning also keeps the tree in shape by keeping the branches even. This prevents it from becoming weighed down on one side. Having too many branches on one side could cause the tree to become permanently crooked.
Many gardeners don't even think about pruning their trees until they start to bear fruit. This is a big mistake, and you should never neglect to care for a tree just because it hasn't yet beg to produce. During the entire process of growth, you should prune the tree in a way that it is even and uniform. Then, when it does start to produce fruit, the results will be significantly greater. It is very easy to tell the difference between a tree that has been pruned regularly during its growth, and one that has been neglected. Generally the shape of the tree is much more natural looking if it has been pruned. The shape you are wanting to aim for is an open vase like shape with 3 or 4 main outward facing branches.
The first thing to look for when you start pruning is any branches which are dead or diseased. These are quite easy to recognise. Usually they don't bear any fruit, and might be misshapen or discoloured. Don't hesitate at all in chopping these guys off, as they are nothing but detrimental to the health of your tree. Sometimes a branch can be dead or diseased without making it too obvious. If this is the case, simply wait until the tree is flowering and it will become obvious by not growing anything.
The second type of branch to look for is the branch that is too close in range to all the other ones. If it grows at such a length and angle that the end is right next to all the other branches, they might end up crowding each other out. Take off the smaller of the two branches to allow the larger one to have the breathing room that it needs. This same rule applies to the weight balance of your tree. Sometimes, for reasons we will never understand, a tree will grow several branches on one side and weigh itself into being lopsided.
So hopefully I have provided you with a basic knowledge of pruning. There are more situations and types of branches that require pruning, but what I've outlined is the very basic parts. These can alter depending on how old your tree is. For example, for the first 3 years of a tree's growth it requires pruning that follows more informative guidelines. After the tree is well established, you will need to use regular pruning to keep it where you would like it to be. There are entire books written on how to prune trees depending on how old they are. There are far too many techniques for me to go over, so if you want to use these advanced techniques then head to your local library and check out a pruning book.