A landlord can't proceed with an eviction lawsuit without giving notice (warning) to the tenant first. State laws set out detailed requirements as to how landlords must write and deliver ("serve") termination notices. If the tenant doesn't move (or reform -- for example, by paying the rent or finding a new home for the dog), the landlord can file a lawsuit to evict.
(For more information, see How Evictions Work: What Renters Need to Know.)
For all the legal and practical information you need to deal with your landlord, see Every Tenant's Legal Guide, by Janet Portman and Marcia Stewart (Nolo).
Landlords may make deductions from a tenant's security deposit, provided they do it correctly and for an allowable reason. Many states require landlords to provide a written itemized accounting of deductions for unpaid rent and for repairs for damages and necessary cleaning that exceed normal wear and tear, together with payment for any deposit balance.
The deadlines vary from state to state, but landlords usually have a set amount of time in which to return deposits, usually 14 to 30 days after the tenant moves out -- either voluntarily or by eviction. (See Chart: Deadline for Returning Security Deposits, State-by-State.)
(If your landlord is withholding your security deposit, see Get Your Security Deposit Back.)