Any type of producer may work as a freelance producer. In this situation a record company might have signed a band or act and be scouting round for someone to put it all together in the studio.
Obviously all the producers know the record company A&R people, and the A&R people know who the key producers are. Matching an act with a producer is an important A&R skill. Sometimes the decision will be made on a 'flavour of the month' basis.
If a producer has had a series of successful records, then he may be seen as being on a roll and the next production will be a big seller too. But the act and the producer must also be compatible in some way.
Perhaps they will share the same musical vision, and have a deep understanding of the style of music in which they work. Perhaps they will also get along well together because they are musically in tune. On the other hand, perhaps a band is wilful and potentially difficult to work with.
The producer must be capable of exercising a degree of control to shape the band into something that will work on CD as well as it does on stage. Maybe an older and more experienced producer will have more respect in the band's eyes, or maybe they need someone who is able to share their vision and will simply smooth over whatever rough edges need to be smoothed (and leave well alone the rough edges that need to remain rough!).
The freelance producer will be paid by the record company (who will get that money back from the band's share of the eventual profits) and he or she is then free to go on to work for another record company as they please.