When an emergency arises at your apartment or home and you're renting the apartment or home the landlord can enter at anytime without prior notice during an emergency.
An example of emergency for a landlord would be water leak, gas leak, fire, sewer backup etc.
Other times when the landlord just wants to inspect or make repairs the landlord must give 24 to 48 hours minimum notice in advance to make entry into the apartment or home.
When it's an emergency the landlord does not need any notice because they wouldn't be able to since it's an emergency.
If there's an emergency then you have to let the landlord in as well as any repair people to perform the repairs.