In a medium sized sauce pot, combine sugar, salt, cornstarch, and cocoa powder. Whisk together until the ingredients are evenly incorporated. Gradually add your milk to the dry ingredients, whisking well after each addition to avoid clumps.
Place the pot on your stove top set to medium heat. Cook the mixture, whisking constantly, until it comes to a boil and thickens (about 10 minutes). You'll know the pudding is done when it's thick enough to coat the back of a spoon.
Take the pan off the heat. While the pudding is still warm, add your butter and vanilla. Stir until the butter melts into the pudding and everything is fully incorporated.
Transfer the pudding to your serving dishes. Pudding can be served warm or cold. If you choose not to serve the pudding right away, cover it with plastic wrap touching the surface of the pudding (to prevent it from forming a skin) and refrigerate until ready to serve. It'll keep for up to 1 week in the fridge.