Foundation courses are for people who didn't take the right A levels for medicine, and need to do some basic science before starting on the main medical degree. They are for people who only realised they wanted to do after making their a level choices, and are only offered at some universities
An undergraduate degree is any degree you don't need a previous degree to do. They are the type of degree you do straight from a level, and will generally be a bachelors. The A100 MBBS/MBChB standard medical course is an undergraduate degree
A postgraduate degree is any degree that you need a previous degree to get on to. For most subjects, these would be masters or PhDs. For medicine, you can study as a postgrad on a graduate entry programme. This is where you first complete one degree and then do a shortened 4 year medical course. These are only offered at certain universities and are very competitive