To apply for an Indefinite Leave to Remain (ILR) you need to be present in UK for 180 days or more for any of the first 12 months from the date of your application. These 180 days or more should be continuous and should be without any absence.
In case if you want to know how long it takes to get an ILR in UK-it takes around 6 months for the ILR application to be processed and completed. You need to submit your passport with the authority. Do note that the time limit of ILR is indefinite, however, you could lose it if you stay outside UK after getting an ILR for more than two years.
Indefinite Leave to Remain in UK or ILR is granted to people who have a valid UK Visa. After the Visa holder has lived and stayed in UK for a specific period of time which is of 180 days or more (check the government rules on calculating the continuous period in UK for indefinite leave to remain.) After obtaining the ILR the person who holds the ILR for 12 months is eligible to apply for a British citizenship