Often I hear doing a hard reboot (completely powering off a computer and restarting it) as opposed to a soft reboot (restarting by some command in the operating system). What, exactly, are the differences between them? And why is a hard reboot sometimes necessary? Is there a difference depending on OS such as Windows, Linux, or Mac OS X?
A "power-off-on-reset" may affect your hardware negative (e.g. HDD) if you do it very often or don't wait some seconds before switching on again (may affect your power supply).
In general the major difference is that each and every component of you computer is getting resetted on a power-off-on-reset. Making a reboot via software or reset-switch only affects those devices that in some way are getting informed about the restart by a bus system or a reset-signal.
If a component is in a state where it hang so badly that it is not even able to process this reset signal that there is a difference. I had the case of an USB powered smartcard reader with badly programmed Win7 drivers that requires a power-off-on for working again. Of course you don't have to power down the whole PC for resetting an USB device...
Another difference you will get on devices that are only connected to power and to not get any reset-signal. I have the case e.g. with a SATA2IDE bridge that is not fully stable when running 24/7. Every two or three weeks I power it down for making to work stable.
In another question posted today (03 April, 2016) user @Celeritas posted an almost identical question. The last answer to this question was posted almost 4½ years ago, so I believe an update is warranted.
Back in 2011 most HDDs parked their heads in the so-called landing zone. Today most HDDs park their heads completely off the drive (I've take enough apart to know this), so there is little difference between shutting down a HDD via a cold boot and a warm boot, as the heads in today's HDDs never contact the disks' surfaces.
I can't enumerate all the difference between a cold and warm boot, but a couple of big ones are the system and graphics RAM. Unless the graphics driver is specifically designed to do so, its RAM is not cleared during a warm boot. Whatever was there before the reboot will be there after the reboot, unless the video RAM gets overwritten during the reboot, which is probably 99.99% of the time, but that .01% can cause endless headaches. (On another machine I used to see bits and pieces of whatever was in my graphics RAM during a warm boot after the machine had shut down.) This can also be true of system RAM. At work before I retired, if we had problems with our servers (multiple app and database servers) and needed to restart them, we often could not clear the trouble without shutting down the machine for at least thirty seconds or more.
So if you're having problems with a computer that seems to be RAM related, the best advice is to shut down the computer for at least twenty, if not thirty, seconds and then start.