Around two to three months before your lease expires (this is a rough estimate) you should get correspondence from your landlord asking you if you’d like to renew your lease for the next year or not renew your lease. Renewing may include a rental increase. If you are not sure about you future plans, some landlords may offer you the option of going month-to-month for a little while.
If you have a rent stabilized lease, landlords are required to offer you a renewal. If your lease is deregulated the landlord does not have to offer you a renewal.
If your rent does increase, expect to pay the difference towards the security deposit.