It depends on the type of costume. Holiday outfits for events like Christmas, Easter, and Halloween come from Jagex's seasonal mini-quests—finish the event and you'll receive a costume piece. Some discontinued holiday items still circulate on the Grand Exchange, but they sell for enormous sums, often tens of millions of gold.
Other costumes can be earned by completing random events. Choose the "Save up for outfit!" option when you open a random event gift, bank enough points, and you can redeem certain outfits at Thessalia's Fine Clothes near the center of Varrock (holiday-event costumes are excluded). Finally, more costumes are handed out as rewards in Balthazar Beauregard's Big Top Bonanza, where higher Ranged, Magic, or Agility levels earn you better prizes.