
Quoting
California Civil Code, Sec. 1161.
A tenant of real property, for a term less than life, or the executor or administrator of his or her estate heretofore qualified and now acting or hereafter to be qualified and act, is guilty of unlawful detainer:
1. When he or she continues in possession, in person or by subtenant, of the property, or any part thereof, after the expiration of the term for which it is let to him or her; provided the expiration is of a nondefault nature however brought about without the permission of his or her landlord, or the successor in estate of his or her landlord, if applicable; including the case where the person to be removed became the occupant of the premises as a servant, employee, agent, or licensee and the relation of master and servant, or employer and employee, or principal and agent, or licensor and licensee, has been lawfully terminated or the time fixed for occupancy by the agreement between the parties has expired; but nothing in this subdivision shall be construed as preventing the removal of the occupant in any other lawful manner; but in case of a tenancy at will, it must first be terminated by notice, as prescribed in the Civil Code.....