Yes and no.
In Japan, prostitution and/or prostitution like activities are illegal. So, you there are no brothels or whore houses that are licensed and approved by the government and recognized as legitimate businesses.
However, there are lots of "massage parlors","soap lands", "peep shows", "adult shops" and other similar businesses that are allowed to legally operate. Of course, these business are not licensed to provide any kind of sexual services but many of them secretly do simply because there's so much money that can be made.
Owners of places like these can be fined and arrested and have their business licenses suspended if they get caught, but only the really stupid ones ever get seem to get caught. For the most part, as long as no serious violent crimes are committed, I think that the police pretty much just leave these kinds of places alone.
Usually, customers of these places aren't paying for "sex", their paying for some other "service" which just might happen to lead to some kind of sexual activity. Because prostitution is illegal, these business can't legally offer sex. But, customers make private agreements with female (or male) staff working at these places for some kind of sexual act.
If anything happens and the police get involved then the business will just try and say that they had no idea as to what was taking place and that this was something private between the customer and the staff member.
Of course, these businesses really does know what is taking place and many of them encourage this kind of stuff. They make sure they get their share of whatever fee is paid.
The whole is kind of like same how gambling is treated in Japan. Gambling is technically illegal. There are no casino's or anything like that. But, there are pachinko parlors everywhere through out Japan.
Most people play pachinko just like people in Las Vegas play slot machines. They like to gamble and they like to try and win money. However, technically you don't win money at a pachinko parlor.
When you win at pachinko, you get lots of tiny balls. You turn these balls in at the counter for markers or prizes. Most people then take these markers and prizes to "another business" located near the pachinko parlor. This business is set up to be a completely seperate business from the pachinko parlor but in reality is probably owned by the same person/company. People can sell their makers of prizes to this "other company" for cash. That is how people win money at pachinko.