Indefinite leave to remain is the granting of Permanent Residence in the UK. Once it has been granted, there are no longer any immigration related restrictions on the work or business you may do in the UK, and no time limits on your stay in the UK.
The length of time you must spend in the UK before being eligible for Permanent residence in the UK
HSMP and Work permit
5 years(application may be made after 4 years 11 months)
Ancestry
5 years
Marriage
2 years, 1 year if the original application was approved before 1 April 2003
Unmarried partners
2 years
Investors
5 years
Writers, composers and artists
5 years
Sole reps
5 years
Persons establishing themselves in business
5 years
Unlawful stay or a combination of lawful and unlawful stay
14 years
Lawful stay on any basis
10 years
You should note that to keep your permanent residence you should not spend longer than two years outside the UK. You should maintain ties to the UK and should consider the UK as your home(Permanent Residence). If you continue to only spend short periods of time in the UK over many years it is likely that there will come a time when you will lose your indefinite leave to remain in the UK. It is therefore beneficial in most cases to apply for UK citizenship. You can normally apply for naturalisation as an UK citizen one year after being granted indefinite leave to remain as long as you meet the residence requirements.
In order to be eligible to apply for Indefinite leave to remain after 4 years and eleven months on a Work Permit or HSMP you must meet the following requirements
You have been on a work permit (or more than one work permit), or a combination of HSMP and a work permit continously for a period of 4 years and eleven months.
You are currently on a work permit and can obtain a letter confirming that your employer wishes to continue to employ you OR If on HSMP you can confirm that you have been working in a professional or management level job.
You have had lawful status throughout the 4 year and eleven month period.
You have spent most of your time in the UK over 4 years and eleven months or absences abroad have been for business reasons.