Do you embed redundant web components?

I’m pretty new to web design and I’m wondering how do you web pros built websites that carry the same component throughout all the pages.

For example, I’m building a website that carries the same nave bar and footer on every single page. If I need to add some text or something to the footer or nave bar, I need to open every single page to make the changes.

Is there a trick to somehow embed those redundant components so if you have to add to them or update them, you just edit one file. I’m familiar with frames and iframes, but I’m trying to stay away from those.