If you are tied into a fixed term contract, you will be liable for the rent until the fixed term is finished. If you are no longer in a fixed term contract (i.e. a rolling contract) you are still liable to pay rent but your tenancy agreement will define the notice you need to give.