Evan Goer's "Pocket HTML Tutorial: Box Model: Borders and Margins and Padding"
These articles provides a very clear explanation of the element-box model (or simply "the box model") in relation to borders and margins and padding.
Be sure to read both articles.
Click http://www.goer.org/HTML/intermediate/borders/ link to open resource.