It depends. Recent changes to U.S. Department of Transportation rules set limits on the amount of time airlines can keep passengers on board a delayed domestic flight. These regulations also spell out what airlines must provide to passengers during long delays -- i.e. water, food, and access to toilet facilities -- in order to make conditions as comfortable as possible.
Learn more in Nolo's article Tarmac Delays and Airline Passenger Rights.