Undergraduate (BA/BSc/BEng etc) degrees in the UK other than Scotland are normally three years long for full time study. Scottish courses are normally one year longer than courses elsewhere in the UK, although you can apply for direct second year entry with good results. However there are longer courses, for example those with a foundation year (for people who didn't take the right subjects in 6th form) which are normally one year longer, and in STEM fields (and sometimes others) "integrated masters" degrees (e.g. MSci/MPhys/MMath/MEng etc) are quite common, which are again normally one year longer.
There are a couple of other non-medical courses which are longer such as Classics at Oxford, which is a four year BA, and the UCL BA Fine Art (also four years). However three year courses are the most common outside of STEM areas, with four year courses being equally common in STEM areas. The current Conservative government is trying to push a scheme to introduce two year degrees, where you also study during the summer periods. This has met a lot of criticism however.
Medicine/dentistry/veterinary medicine degrees are normally five years long, although you will usually be able to "intercalate" for an additional year in medicine (and possibly the others), and some courses require you do this, and there are a handful of courses with a foundation year (normally for those meeting widening participation criteria) So these courses are usually five or six years long. However sometimes you can do a PhD instead of/after intercalating, which would be an extra three years.
Postgrad is usually 1 or 2 years for a full time masters and normally 3-4 for a PhD (usually funding for 3.5 years, although not infrequently people will take a couple extra months at the end to finish writing their thesis or to write up some corrections advised by the committee examining it).