In most cases, you have to stay in the UK on a family visa for five years before you can apply to settle with indefinite leave to remain.