A dynamic website is a consist of front-end and backend application.
Front end application is responsible to design, style and overall view of the application while backend application is the backbone of any dynamic website.
Lets try to understand with example. Suppose you want to create one web application where you want to store the visitors information of that website.
As per above example suppose you want to store the below information of a visitor
- Name
- Address
You need three text field on your webpage i.e Name, Email, Address. Now its upto you which frontend technology you want to adopt like Angular, React or any other technology. By using these technology you can easily create frontend.
Now next thing is to storing the detials. To store those details(Name, Email, Address) in your database you need one backend(it may be java, node, python etc). This backend will communicate with database.