You may be thinking of murder, in particular. The sentence is always, by law, 'life imprisonment', but that rarely means 'until death in jail'. In murder cases, the judge 'recommends' a 'minimum term' to be served before the convicted person is eligible to be considered for parole. That may be any term, even up to the whole life of the prisoner, but the term should follow a tariff, set by the Sentencing Council, a body which recommends sentences, gives guidelines, appropriate to all crimes and not just murder. The judge is not absolutely bound by the Council's guidelines but ought to give reasons for not following them in the particular case. The minimum term in a murder case will apply unless the Court of Appeal allows any appeal to vary it.
In other cases of crime, the judge follows the guidelines. There are only rare examples of a crime where there is, by law, a minimum sentence which must be passed, whatever the circumstances. Nearly all are crimes where the judge can pass any sentence up to the maximum set by law for them,however lenient that may be, even a conditional discharge, though he may find that the prosecution or defence appeal to the Court of Appeal to vary it.