There are many routes of Settlement into the UK and you need to have been in the UK for a prerequisted time.