WordPress themes are PHP based and a page is displayed by combining several template parts e.g. header, footer, sidebar, content etc
Simply, to save time and don’t invent the wheel again.
You purchase WordPress theme. Use it as is or customize it to meet your need.
You have to learn,
– WordPress Theme Development
– WordPress Theme Concepts
Following link will be helpful to you and will address your all questions,