If you mean combat pets: Hunters, Warlocks, Death Knights, Mages, and to a lesser extent Priests can summon pets with a spell that they learn from their class trainer. If you mean the cute and cuddly...
The sinister squashling can be bought from the Vendor Chub (Horde, Undercity) or Dorothy (Alliance, Elwynn Forest) during the Hallows End event (in-game version of Halloween). You do not use gold to...
If by companions you mean vanity pets (the little non-combat pets), they get them the same way all characters do - as rewards from quests, achievements, special events or through the trading card...