If you were hoping for a simple answer, there isn't one. That's because the FAA has made the regulations different depending on whether you are flying domestic flights, flag (international) flights, and whether there are two, three, or more pilots in the crew. Also, flight attendant rules are different from pilot rules.
As for the basics:
In domestic flying, pilots of two-pilot aircraft may not fly more than 8 hours (flight time) between required rest periods. The FAA has decided that rest rules use a 'look back' method. What that means is that at any time you must be able to look back 24 hours and find a legal rest period somewhere in that 24 hours.
For a standard day with a two-pilot crew flying less than 8 hours, that flight time must have been preceeded by a 9 hour rest period. If the flight time exceeds 8 hours for reasons beyond the pilots control (weather, ATC delays etc) they may finish the day that they were scheduled for, but then must receive extra rest before they fly again. The numbers for that extra rest are in the FAA regs. The airline may also schedule less than 9 hours rest (down to a minimum of 8), but after the subsequent flights, the pilots must then have a much longer rest period.
And finally, the definition of 'rest' is that it is "time completely free from company duty". Whether or not the pilot sleeps is completely up to him/her. If the airline puts you up in a hotel starting at midnight, and you have a show time of 10am with another 6 hours of flying that day, it would certainly be wise to get some sleep.
One smooth landing is skill. Two in a row is luck. Three in a row and someone is lying.