The first things you need to learn about html, CSS, PHP or ASP, a little about programming.
After all you can look into their codes and see what you can edit or design according to your ideas.
For examples, if you want to design a xenforo, ipb, vbulletin or phpbb themes, you need to edit on their html templates, all cms have written by template engine so you can edit them without knowing more about programming languages.