Start by gathering all of your ingredients. In a medium-sized saucepan, mix together the sugar, cocoa powder, cornstarch, and salt. Once combined, place the pan over medium heat and gradually stir in the milk.
Continue to stir the mixture frequently as it heats, bringing it to a boil. Once boiling, cook the pudding while stirring constantly until it reaches a thick consistency, enough to coat the back of a spoon.
Take the saucepan off the heat, and mix in the butter and vanilla extract until smooth and well-blended.
Allow the pudding to cool slightly before serving warm, or transfer it to the refrigerator to chill before enjoying.