(a) A person who refuses to surrender possession of real property on demand commits a forcible detainer if the person:
(1) is a tenant or a subtenant wilfully and without force holding over after the termination of the tenant's right of possession;
(2) is a tenant at will or by sufferance, including an occupant at the time of foreclosure of a lien superior to the tenant's lease; or
(3) is a tenant of a person who acquired possession by forcible entry.
(b) The demand for possession must be made in writing by a person entitled to possession of the property and must comply with the requirements for notice to vacate under Section 24.005.