Web Development: Dynamically linking to other related webpages
You'll need some sort of server side program. Something that can query the database, then return the results either through an api or process it all server side and return the html. Below are some frameworks that can help. 
Java:
Play, Spring, Javalin, Dropwizard, etc. 
Python:
Django
I've almost 'finished' my first website. Which consists of an authors anthology, essentially 100's of pages containing individual articles. It's built with HTML and CSS.
At the bottom of each page I want to link to related pages, displaying the title and an image. How can I auto-populate these boxes by fetching related pages from a database? 
I'm just looking for someone to point me in the right direction, I will try to teach myself. I assume there would be some server side scripting? or loading the data into a sql?