If you're a few days late on the rent, that doesn't give the landlord the right to throw you into the street. Eviction is a legal action: your landlord has to go to court and prove that you've violated the lease before he kicks you out. Eviction laws vary among states, but usually the landlord has to send you a warning letter to start the ball rolling.
Cure or Quit
If your landlord is terminating your lease because you broke the rules or didn't pay the rent, your warning letter is usually a "pay or quit" or "cure or quit" document. The letter tells you how you've screwed up and gives you a few days to either fix the problem or move out. If you decide to stay without fixing the problem, the landlord now has the right to launch an eviction and get you out of there.
If your lease is coming up for renewal, or you have a month-to-month rental agreement, your landlord can simply tell you to move out when the lease expires. Doing this the day before you pay next month's rent isn't acceptable, however. Oregon, for example, requires your landlord tell you at least 30 days in advance that he's not renewing your monthly agreement. Even if the lease says you get less time than the law guarantees, the landlord can't enforce that clause.
The worst kind of warning letter is the unconditional quit notice, the written equivalent of yelling "Get out now!" This letter tells you that you're not getting a chance to fix things. Most states restrict them to cases where you've repeatedly failed to pay rent, seriously damaged the apartment or done something illegal such as brewing crystal meth in the bathtub. Even with an unconditional quit notice, the landlord still has to go to court afterward to evict you.
After your landlord sends you a warning notice, look up your state's law on your state government's website or an online legal guide such as Nolo or FindLaw. If your landlord didn't follow state rules for putting you on notice, you may be able to extend your stay by days or weeks. In Oregon, for example, the landlord has to mail the notice or deliver it by hand. If he notified you by email, tell the judge and your landlord will have to send you a proper letter before going back to court.