A couple ways that kind of situation is solved. One, just backbreaking policework tracking down leads on slight evidence...witness has a vague description of a car, something caught on security footage, fibers left behind, footprints...if you've got SOME kind of evidence, sometimes they can eventually run something down. That doesn't happen too often unless it's a really high profile case like a serial killer or child murderer though. The amount of resources requires some agency or agencies to basically write a blank check, so for most murders that's probably not going to happen.
But the more likely scenario is that someone doesn't keep their mouth shut. Usually SOMEONE else besides the killer knows about it...some kind of an accomplice, girlfriend, associate, drinking buddy, etc. Someone he borrowed a car from, or acquired the weapon. Very few people never talk to ANYBODY about their activities. Hell, if they were that damn secretive about what they do, the person hiring them would probably never have found them.
Then someone who knows about the murder, they get rolled up on a drug charge, or robbery, or rape charge or something. And they bargain the charge down with a tip on an unsolved killing. I think that's the most common ways that a relatively cold crime gets solved.
In theory, if you were able to hire someone to commit the murder who was 100% clean, didn't have any sketchy associates that could compromise themselves, don't have any history that would make them suspicious, and didn't need to rely on any help whatsoever, that would be pretty likely to be unsolved. However, what are the chances of that person ALSO being a seasoned enough criminal to pull off a murder perfectly leaving no evidence behind? That ends up being the stuff of movies.
In real life, if you hire an amateur, they f--- it up and are usually caught pretty easily. You hire a pro, and there's a better chance that it's done right. But if you know where to find a pro, chances are the police know who the pros are too. And it's a lot more likely there will be others that know about the deed, so there's always the chance it gets ratted out eventually.