This e-travelling aggregator is also known as an OTA (online travel Agent). They invest a lot of money in keeping their search in Google or other search engine at highest (Big SEO type). As far as the hotelier which make their accounts on to this OTA's (profile),where they can add their images and data such rooms and the rates for the rooms.
There are two system working on their end
-Front end (where any customer can Book rooms)
-Extra net (where the hotel owner can see the bookings which made by customer on the front).
Now as soon as customer made a booking then it will remove 1 room from the extra net and only shows the remaining room at the front end, so when all rooms are sold it will not show at the front. This works in real time and can customise discounts/packages (Like complimentary breakfast or pickup - drop off facility)