It depends. If you are on a month-to-month lease, in most states you are required to give the landlord 30 days notice to end your lease (usually that notice will be given on the day that you pay your next month's rent). If you have a lease for more than a month-to-month duration (for example a 6-month or 1-year lease) you lease may contain a provision for early termination. Sometimes leases will provide for early termination of a lease in certain situations, for instance if the landlord agrees in writing to an early termination or if the landlord agrees to a sublease or assignment of the property. If you don't get prior permission or your lease doesn't provide for early termination, then if you leave early you will be “breaching” the lease contract by leaving early. When a tenant breaches a lase, by leaving early without permission or failing to pay rent due for remaining months of the lease, then the tenant may owe the landlord money for the remainder of the lease term or until the landlord can get anthother tenant. A landlord may sue a tenant to recover any money owed for leaving early and breaching the lease.
However, if the reason you like another place better than your current place is because the landlord has failed to provide a habitable space or otherwise has materially defaulted on his/her obligations under your lease, then you might be able to terminate the lease early depending on your state's laws.