What's the difference between factory reset and hard reset? I know that both of them wipe data and revert the device settings as they were - - but let's say I notice a bug on the device. 

Should I pursue a hard reset it factory reset? What are the key differences?
Hard-reset does not wipe data. It is a forceful way of restarting the device. 

To put it simply, Factory-reset, is to restore the device to the state it was in when you got the new device (excepting the upgrades) and is a sledge hammer approach, while hard-reset is restarting device to get rid of minor irritants . Which approach you want to take depends on the "bug" you have and how severe it is. Look up the tag wiki information and questions to help you decide what you need to do to fix your bug

Key differences below:


Added hard-reset tag to your question. Quoting from hard-reset tag wiki



  A hard reset is traditionally when you kill all power to the phone and then boot it up from that state. Normally you remove the battery, then put it back in and boot up. Unfortunately, some people use "hard reset" when they really mean factory-reset.



Again quoting from factory-reset tag wiki



  A factory reset results in a full reset of an Android device to the original settings of the currently-installed ROM. This process deletes all user data and user installed apps, so the device looks like it came fresh out of the box. Usually this corresponds to the state it comes in from the factory (hence the name "factory reset"), which sometimes can be a little misleading: A factory reset will not roll back any possibly applied updates to the system.