Human factors is a combination of aviation medicine, psychology, engineering and ergonomics. It encompasses all of these factors trying to understand the man/machine interface in the aircraft. It has its roots in aviation accident investigations resolving these where no clear technical cause could be found when aircraft became more and more reliable over the years.
As a lone pilot or airline crew we need to be alert, healthy and fit so that the flight can be conducted without any problems. Remember that human fatigue can introduce issues possibly resulting in a disaster.
The FAA defines fatigue as: "Fatigue is a general lack of alertness and degradation in mental and physical performance." (source: FAA Fact Sheet September, 2010).
Skybrary defines "Fatigue is the general term used to describe physical and/or mental weariness which extends beyond normal tiredness." (source: http://www.skybrary.aero/index.php/Fatigue).
Fatigue extends beyond normal tiredness. It sets in when a person does not recover from normal tiredness by having enough rest and or sleep. Until he/she finally succumbs to sleep.
During flight, when a pilot is fatigued, it can cause him or her to experience micro-sleep moments or even fall asleep during the cruise portion of the flight. His/her performance during take-off and landing can be severely impacted resulting in dangerous situations. I think we all have experienced this one way or another, when driving our car late at night along the highways.
Other hazards include an increase in reaction time (slow response to counter turbulence), missing equipment malfunctions, memory problems (not remembering radio calls) and a lack of attentiveness (missing instructions from ATC) from the pilot. When this sets in, the flight is at a higher risk and could become the subject of an accident.
When persons become mentally fatigued they will experience problems with even the simplest tasks and are unable to perform these efficiently. The main cause for this is interruption in the sleep pattern and those of you working early or late night shifts will notice these effects sooner or later.
During work requiring physical force or exercise, one will experience a tiredness of the muscles. After a while, when fatigue sets in, the inability to exert a force with the muscles reduces to a level lower than would be expected when not tired or fatigued. This physical fatigue may lead to mental fatigue and the person can only recover with enough rest and sleep.
Flying across multiple time zones and even a daylight saving clock change can cause some people to experience sleep problems, you need to take this into consideration should you suffer from this effect. International long-haul flights and their crews are at risk that their circadian rhythms are interrupted depriving them of satisfactory sleep prior to their duty. Fatigue might set in at some point during the flight. Crews have been fired over this, so be aware.
As already said: The only way to recover from fatigue and sleepiness is to take a good rest and sleep, this can not be stressed enough. Even a small nap of a couple of minutes will refresh a person to such a level that he/she can continue if one experiences these micro-sleep interruptions.
Most people need eight hours of sleep within every 24 hours. This keeps them performing effectively. Should a person have accumulated a sleep debt then he or she will need more than nine hours of sleep to recover. This sleep should be at night for the best results as most have problems sleeping during the day.
General aviation pilots are normally not subjected to these phenomena. But even they need to be fully rested before they start their flight, especially when venturing into unknown terrain and or flight regions where they need all of there attention.
More detailed info in FAA AC 120-100: the Basics of Aviation Fatigue.