It’s a terrible feeling: You come home from a long day of work, wondering what to make for dinner, when you see a large piece of paper taped to your door. Your heart sinks as you read it, realizing it’s an eviction notice telling you that you have to leave your home.

If this has happened to you, you’re certainly not alone. According to real estate site Redfin, over 2.7 million people faced eviction in 2015. High rents, low wages, and constantly changing market conditions make keeping up with rent payments difficult. (See also: The Simple Way to Decide How Much Rent You Can Really Afford)

If you’ve received an eviction notice, here’s what you should do next.

The eviction process

If you fall behind on your rental payments, or pay only a portion of the amount due, your landlord can evict you. However, the process is more complicated than just telling you that you have to leave. Eviction laws vary by state, so it’s a good idea to check out your state housing department’s guidelines.

Generally, to evict you legally, your landlord has to follow an eviction procedure.

1. You will receive notice

Your landlord must issue you notice before proceeding with the eviction. This could be a 30-day notice to either vacate or comply, a pay-by date you must meet, or a deadline to rectify whatever violations are grounds for the eviction. In some cases, you may have only a couple of days to come up with funds or fix the problem. If you can’t come up with the money or address the issue, the landlord can proceed to the next step.

2. Your landlord will pursue a court order

If you do not pay the balance on your account, or comply with the terms of the eviction notice, your landlord can get a court order against you. Once you receive the order, you can…