Where a tenant wishes to leave during a fixed term, or simply vacates without notice, this is an offer to surrender. A landlord may accept such a surrender or refuse to accept (see this article for much more detail).
In the case that the landlord is willing to accept the surrender, it is best to have a notice to surrender from the tenants.
Notice to surrender by tenant to landlord guidance
Where a tenancy is running periodic, a NOTICE TO QUIT from tenant is normally more suitable than this notice (Guild Form F019, see this group of posts). This notice should only be used on rare occasion and you should contact us before using this notice to clarify the reasons for using this notice.