You need prescription to get them, if you have them without prescription they will be confiscated but you wont get arrested AFAIK.
There are lot of undeground labs, but lot of stuff is of poor quality and is much much more expensive than if you get prescription and buy them from legal sources. So undeground is ok for bodybuilding purposes, but for TRT not so much.
Problem in UK is that lot of doctors are really ignorant, and standards are quite poor- meaning you need to have really bad bad results to get scripts.