Not paying rent
If a landlord sends a tenant a 5 day notice for not paying rent, the tenant can stop the eviction by paying all of the rent due.
If the tenant can pay only part of the rent, the landlord can accept it and still continue to evict the tenant. However, if the landlord agrees in writing to allow the tenant to stay when they pay partial rent, then the landlord has to let the tenant stay.
Breaking a rule in the lease
In some cities, such as Chicago, the tenant can stop an eviction which was started because they broke a rule in the lease (a 10 day notice eviction). The tenant can fix the situation within the 10 day notice period. This is known as "curing" the lease violation. For example, if the lease says "no pets," and the tenant adopts a dog, the landlord can give them a 10 day notice. If the tenant then gives the dog to a friend, they can stay in the apartment.
Be sure to check your local laws to see if the tenant can fix the violation, and demand documented proof of what action the tenant took to fix the violation.
If a landlord serves a tenant with a 30 day notice to end a month-to-month lease, they can't accept the next month's rent. If the landlord accepts rent the following month, they have renewed the lease, and must give the tenant a new notice.
Waiting until the notice period is over
A landlord cannot file an eviction case before the end of the eviction notice period. After the notice period ends, the landlord should not accept rent from the tenant unless they have an order from the court allowing them to accept "use and occupancy." This is a term for rent during a court case. If the landlord accepts rent after they end the lease, the tenant may be able to argue the lease never ended, and that the case should be dismissed.