The sound you are hearing is the starter gear spinning and not engaging the flexplate and therefore the engine will not turn over and start the car. This could be caused by a couple of things.
Most likely a weak starter. Because it is weak and slowly failing every so often it does engage the flexplate and starts the car. The solution is to replace the starter.
Another possibility, but less likely, is a weak battery not providing enough voltage to the starter so it cannot engage the flexplate and start the car. If you have a multimeter you can check the battery voltage. It should be 12.4-12.7 volts with engine off. If you don't have a multimeter you can take your car to an auto retail chain (e.g. Napa, AutoZone, Pep Boys) and they will check your battery voltage for free.