Earning a Cog disguise in Toontown depends on which type you're after:
Sellbot: Defeat the Factory Foreman at the end of the Sellbot Factory in Sellbot HQ 10 times.
Cashbot: Complete the ToonTasks in all neighborhoods.
Lawbot: Complete the ToonTasks in all neighborhoods.
Bossbot: Complete the ToonTasks in all neighborhoods.
Finish the relevant requirement and your Cog disguise is unlocked.