Prolog is like a puzzle game where you have to ask the right questions to get the right answers. The words you use to ask the questions are called syntax, and the meanings of those words are called semantics.
Think of syntax like the rules of the game. Just like how you have to follow the rules of a board game or a video game to play it right, you have to follow the rules of Prolog to get Prolog to work. For example, if you want to ask a question in Prolog, you have to use a specific set of words in a specific order. If you use the wrong words or put them in the wrong order, Prolog won't understand what you're trying to ask.
Semantics is like the meaning behind the words. When you ask a question in Prolog, you're essentially asking it to search through a database of information to find the answer. The words you use in the question tell Prolog what you're looking for, and the semantics behind those words tell Prolog how to find it.
For example, if you ask Prolog "What is the capital of France?" it knows to look for a fact in the database that says "France is a country" and "The capital of France is Paris." It knows this because of the semantics behind the words "capital" and "France." These words have specific meanings that tell Prolog where to look in the database.
So in summary, syntax is like the rules of the game, and semantics is like the strategies you use to win. To get Prolog to work, you need to follow the syntax rules and use the right semantics to get the answers you're looking for.