Putting in higher octane will probably never hurt a car... It will do nothing more than burn smoother and slower. In a car that doesn't need a smooth/slow burning fuel it will not help anything. In fact, putting in higher octane when the car isn't designed for it will probably lower the performance since lower octane fuel actually has more energy and burns quicker (it's got more volatile components). Then again, higher octane fuels usually have more additives for cleaning your engine put in, so sometimes you'll notice a performance increase as the fuel injectors and valve-trains degunk themselves.
As Brian MP5T points out... performance cars have high compression ratios for increased power, but because of that they require high octane, smoother burning fuels or early detonation (knocking) occurs which will hurt just about everything in the engine.
Some companies (VW, for instance) reccomend high-octane compression ratios... but also have knock-sensors and routines programmed into the computer to just retard the timing should knocking occur. Thus, on the inside of their gas cap, they say "reccomended 91, minimum 87"
Octane is a rating that measures how smoothly a fuel burns. It's called "octane" because there was a baseline measurement done for combustion rate on octane (8-carbon saturated molecule, like propane is a 3 carbon saturated molecule... I think, it's been a long time since Orgo). Since "gasoline" is a mix of several different refined fuels with different bonding structures distilled from crude oil... it has the potential to burn less smoothly or more smoothly than pure octane... and you can add more slow-burning fuels, or things that reduce the volatility (additives) to increase the octane rating.
So yea... geeky lecture reduced: adding higher octane to a car that doesn't need it is pretty much a waste of money (unless you haven't added fuel injector cleaner in a while and want the detergent additives). Adding lower octane fuel to a car that specifically requires it will probably hurt the engine... Creepy cars like VW give you more of a choice, and then it's just how much you want to spend.
hope this helps