Your landlord can't evict you without terminating the tenancy first. This usually means giving you adequate written notice in a manner that complies with state law. If you don't move or fix ("cure") the problem that prompted the notice, the landlord can file a lawsuit to evict you. In order to win, the landlord must prove that you did something wrong that justifies ending the tenancy.
State laws contain detailed requirements for landlords who want to end a tenancy. Each state has its own procedures as to how termination notices and eviction papers must be written and delivered to the tenant ("served"). Landlords must follow state rules and procedures exactly or risk having their case thrown out of court.
Although terminology varies somewhat from state to state, when you violate your rental agreement or lease in some way, you'll likely receive one of the following types of termination notices:
Even when you haven't violated the rental agreement and have not been late paying rent, a landlord can probably ask you to move out at any time (assuming you don't have a fixed-term lease) as long as the landlord gives you a long enough notice period.
For example, if you have a month-to-month rental agreement, in most states your landlord can give you a 30-Day Notice to Vacate to terminate a tenancy—even if you've been an ideal tenant. (The length of the required notice might be slightly longer or shorter in some states.)
Following receipt of a termination notice, if you haven't moved out or fixed the lease or rental agreement violation, the landlord must properly serve you with a summons and complaint for eviction in order to proceed with the eviction.
The court will set a date and time for a hearing or trial before a judge. You must show up to this hearing. If you don't, the judge will likely rule against you, even if you have a possible defense to the eviction.
If you do get hauled into court, you might be able to diminish the landlord's chances of victory. Perhaps you can point to shoddy paperwork in the preparation of the eviction lawsuit. Or maybe the landlord's illegal behavior, such as not maintaining the rental property in habitable condition, will serve as a good defense, as would a claim that the eviction lawsuit is in retaliation for your insistence on needed, major repairs.
Even if the landlord wins the eviction lawsuit, the landlord can't just move you and your things out onto the sidewalk. Landlords must give the court judgment to a local law enforcement office, along with a fee. A sheriff or marshal gives you a notice that the officer will be back within a few days to escort you off the property. At that point, it's best to acknowledge defeat and leave on your own steam.
If you're a renter and want more information on evictions, see Every Tenant's Legal Guide.