The act of paying money in exchange for sex is legal but a lot of actions around that are illegal. Soliciting in a public place (either in person, by leaving cards in telephone boxes, not sure how that works in the internet age), kerb crawling, pimping and running a brothel are all illegal.