Summarize this article:

In many places, including the State of California, you must give the landlord the same amount of notice as there are days between rent payments. Check your lease for the notice requirement - this document will probably also contain instructions and rules for announcing your departure. Understand these rules before you give your notice, as they will help inform your decision. For instance, if you are on a fixed-term lease, by moving out early, you may be breaking the terms of the lease, and thus may be held responsible for future rent, advertising costs, etc. Unlike giving notice to an employer, giving notice to a landlord usually requires some sort of written notification. In this letter, you will want to include important information in the notice, such as the name of everyone who is vacating the property, the address of the property you are vacating, the address of the property you'll be moving  to, and the date you intend to leave. The tone of your letter should  serious and formal, with an eye for proper spelling and grammar. If you can, it's a very good idea to speak with (or, at the very least, strike up an email conversation with) your landlord so that you can go over the arrangements you'll need to make to move out. S/he may require that you drop off the key at a specific location on your last day. S/he may also want the house completely clean by a certain date, even if you're not required to move out until later. It's best not to  guess  about these things, so talk to your landlord as soon as you can. When you contact your landlord, mention that you'll be able to turn the property over in clean (if not perfect) condition. Delivering the property in good, clean condition will increase your chances of receiving back all or most of your security deposit. Many landlords will require an in-person inspection (that you'll need to be present for) before you hand the keys over. This is in the interest of both parties. Your landlord wants to make an honest assessment of the condition of the property so s/he will be able to take money out of the security deposit for repairs, etc. You, on the other hand, want to be there so that your landlord can't make false statements about the condition of the property to cheat you out of your deposit. When you talk to your landlord, be sure to ask him or her when they plan to inspect the property so that you can arrange to be there as well. Usually, when you rent a property, you pay a substantial deposit up-front (traditionally, one month's rent). When you move out, you are given this deposit back, minus the cost of any repairs the landlord needed to make do to damage on your part, etc. Assuming you've treated the property with care, you should get back most, if not all, of your initial deposit.  Be up-front with your landlord about the fact that you'll want your deposit back after you've moved out and any needed repairs are paid for. Don't leave this unsaid - while most landlords are honest people and will plan on giving you back your deposit,  on the off chance you  do  have a dishonest landlord, you may need to bring this up yourself. Don't let a landlord evade your questioning. Be persistent - don't let a fear of awkward conversation allow a landlord to slink away with your hard-earned deposit money.

Summary:
Check your rental agreement. Send a written notice to your landlord. Talk to or call your landlord to discuss departure requirements. Assure your landlord that you will clean the property before departure. Schedule a walk-through inspection. Make arrangements to collect your security deposit.