Most of them were sculpted separately and put onto shelves or in niches provided in the walls for the purpose - they were left empty until some one paid for a sculpture. Some of the sculptures, like gargoyles and like the niches, were carved on the blocks that made up the walls - "Now 40 feet up, we have ten blocks 2 x 2 x 1.5 feet and three of them have this face carved on one side. Get to work, we need them in a week."
As for who - itinerant stone carvers traveled from place to place to be hired for part of the year or longer as it took a long time to build a cathedral