The primary purpose of a hood is to shade the lens and prevent flare. It's a bit like shading your eyes with your hand, or using the sun visor in a car. But TBH, I think their main function these days is protection, for which they are very effective.
In practise, a fixed lens hood on a zoom lens is only ever optimum at the shortest focal length because it cannot be made any longer without intruding in the picture (known as mechanical vignetting). And if you fit a full frame lens on to a crop format camera (eg Canon EF as opposed to EF-S) then even at the shortest setting it's not going to be optimum. Sigma has started to supply some of its lenses with an extension to the hood for use on crop format cameras, for this reason.
A really accurately fitted hood makes a big difference in difficult light, eg when there is bright light just outside the frame. Of course, a hood can do nothing if for example the sun is actually in the picture.
An ideal hood is rectangular, and shades the lens right up to the edge of the image. Petal hood are effectively rectangular, as said above, when seen through the lens. Hold one up to you eye and take a look. But making them round is cheaper and stronger, and you can reverse them on the lens for storage.
I use a very deep hood when shooting bright white backgrounds in the studio, and that gives a useful boost to contrast by cutting out all the bright light from the background outside the image area. I use the hood from a 100-400L on my 24-105L lens, and it only intrudes into the picture from about 85mm and below, so that's about perfect.
This is another very good lens hood from Kood (also doubles as P-type filter holder)
http://www.premier-ink.co.uk/photographic/square-filters/p-type/ptype-bellows-hood-p-1259.html It's a bellows style, so you can adjust it just right. There is also a slot in the front where you can slide in a black card rectangle for even better shading of longer lenses. By the same token, if you cut a rectangle out of a piece of card and BluTack it to your existing hood, that is also very effective but you need a different sized rectangle for every focal length! Easy enough to knock something up for studio use maybe, when you're often usuning the lens set at just one focal length.