The maximum number of hours depends on the airline. For some airlines, it is 14 hours; for others, it is less or more.
As for deadheading (which applies to pilots and flight attendants), it is the act of positining to a city in order to start a pairing (a series of flight) or the act of flying to another city after a pairing to position for the next flight. Deadheading (or positining) can be done before a pairing, in the middle of a pairing or at the end of a pairing.
Example (with AC):
Monday: operate YYZ-YVR, then deadhead to YYC
Tuesday: operated YYC-LHR
Thursday: operate LHR-YOW, then deadhead to YYZ (home base).
When crews deadhead, they are essentially passengers on the flight (often times in uniform, though).
I hope this helps.
Next flights: YQM-YOW-YOW / YQM-YYZ-CPH-YYZ-YQM / YQM-YUL-LYS-BRU-YUL-YQM / YQM-PUJ-YQM