I have created a website layout and design but finding difficulty in logic

i want to understand how the logic works and how to implement it to my website