How to make a themplate?

I have run my website for a good 5 years now but it's becoming too big, my friend had a website where he only needed to edit the template at the moment i have to edit every single page and i have 200 plus pages it take me ages to sort it out for minor update.

The solution for that is to use a server-side language. You need to check which ones your web host supports and tell us so we can provide further help. The major ones include PHP, ASP, ASP.Net, JSP, and Perl. If you have a choice, I recommend PHP.