Are the total hours of an aircraft based on flight hours or operational hours?
Cycle
One takeoff and one landing makes up one cycle. Counting cycles is important to keep the number of times the cabin was pressurized (with the assumption that the airplane flies at high altitude). It is also significant for engine maintenance. A cycle and flight/operation time are not related.

Hours
This is the time when an airplane is in operation (more on this below).

Flight Time
Generally speaking, it is the time when an airplane is flying. It is the duration from when landing gears leave the ground to when they touch the ground again. Pilots are not paid by this. In my opinion, it is mostly used by flight trackers to inform people if an airplane has landed or not.

Operation Time
For GA airplanes, when the airplanes is started, Hobbs meter starts and it stops when the engine is turned off. Most commonly, this is how rental GA airplanes' rent is calculated.

For commercial airplanes, pilots pay clock starts when parking brake is released and ends when the parking brake is set.

Hence, total hours is more closely related to operation time.



If you are talking about total time and total cycles in reference of retiring an airplane, that is a different discussion. Each part of an airplane has a certain life. Though most of the time it can be predicted, but sometimes a certain component fails earlier than the expected life and therefore needs to be replaced. Airplane manufactures do specify a design life limit, but that is normally changed because of regular maintenance.