The CSS box model is the arrangement of elements; essentially it contains the content, padding, border, outline, and the margin.
Padding is solely around the content; it is transparent and will take on any background color given. Whereas a margin adds space around the element's outline, border, padding, and content; it too is transparent but willnot take on an assigned color.
The total height and width of an HTML element is determined by whatever box type you choose to use. Your options are the content-box or the border-box, assuming no others come along in the near future.
The coding above is used to set the padding deminsions of the top and bottom at 25 pixels and the right and left at 50 pixels