It's probably helpful to first explain this syntax:
margin: 5px 10x;
In your question you mentioned that this allows you to set the top and then bottom margins, but that's not exactly correct. The two-value syntax specifies which values to use for the top and bottom and then the left and right. The code above, for example, specifies 5px margin on the top and bottom and 10px margin on the left and right.
If we add a third value to it:
margin: 5px 10px 15px;
...it will behave the same as the two-value syntax above, but set the bottom margin to 15px. So, to be explicit, the three values here are specifying that the top should be 5px, the left and right should be 10px, and the bottom should be 15px.