Your first question:
a) To learn how to build web sites, start with the W3S tutorials on HTML and CSS.
Note: It is simplest to embed the CSS in the HTML at first, that way you have only one source file per web page.
b) Once you have got to grips with building simple sites with HTML/CSS you have a choice:
i. Add server functionality with PHP, or...
Again there are W3S tutorials for both of these. Note: As your interest is in gaming, perhaps the latter is more appropriate in general, but register.php etc. are, not surprisingly, written in PHP. So if you want to understand what they do, you need to learn PHP, and perhaps SQL as there is likely to be a database back-end holding the registration details...