Hotels of any significant size and complexity generally have a property management system, a computerized system that tracks the status of each room, guest booking, bill, etc...
One of the functions of this system is to prepare a housekeeping report (which could be accessed through tablets or simply printed out and distributed to housekeeping staff) detailing the status of each room: vacant or occupied, whether a guest is arriving, checking out, or staying through, whether the room has been cleaned or not, whether the customer has opted out of housekeeping service, inspection status, and so on.
The specific ways in which hotels will use this information will vary depending on the hotel and its operations, but it means housekeepers and supervisors know which rooms need to be cleaned for each day, what type of service to perform in each room (more steps are needed between guests than for stayovers), and how to prioritize the rooms.
Information about the status of rooms as cleaning happens is reported back into the system so the front desk knows whether a room is ready to be assigned to a newly arriving guest. This also ensures that no guest rooms are missed (e.g. a guest has the Do Not Disturb sign on in the morning when housekeeping visits; they'll need to return later in the day to see whether the guest has taken down the sign). The system for this can be as simple as a clipboard with a list of rooms and a pen or more complex, such as two-way radios to report room status back to a supervisor, special codes entered on the guest room telephone to update the room's status in the property management system, or with tablets or smartphones.
There's been a recent shift toward less frequent housekeeping in many hotels in the US, and so the report would also be used to track that and ensure that housekeeping is provided on whatever the hotel's desired schedule is or in response to guest requests.
I should add that some hotels have occupancy sensors (a slot for the guest to insert their key near the door and/or motion sensors) in guest rooms. This is primarily for energy conservation and may be required by building codes, but some hotels will use it to help direct housekeeping to rooms while the guest is out, rather than wasting time and causing disturbances knocking on doors of occupied rooms.