A game is a structured activity that people engage in for fun or challenge usually involving rules, goals, and interaction.
Game mechanics:-
A game mechanics involves interaction of collision engine, physics engine, Agent Ai. To make game more real life like, all the thing should work flawlessly.
A collision engine also has two sub parts. collision detection and collision reaction.
What is collision detection ?

In a 2d or a 3d space when an object hits another object in free space collision happens and we need to detect it when it happens this is called collision detection. Above you can see in a 2d space a circle and one side of a square both the object are hitting this is called collision and detection of that hitting is called collision detection.
What is collision reaction ?

In Above image you can see a red circle has a tracjectory that is, it is comming from 'a' hitting at 'b' know we need to decide its future trajector this is done by collition reaction over hear it is 'c'
What is physics ?

In Physics we determine parmeter of objects, it's trajectory and it's behaviour. Over here we need to determine what the Red circle, side of the square is made up of such as side of square is made of brick and circle is made of rubber. Know we need to determine how will they behave when rubber circle hits a side made off brick and what will be it's future trajectory. Some time we even have to set end goal for the object. like will the object break, collaps or deflate.
Agent Ai
In games where there is a competetion such as two player game we need to set Ai for the second player that will compete with the user and make it a challenge for the user to win. Challenge is what makes a game more fun. First foundation of any game is to provide user with fun. Challenge is what provides user with fun and achievement. Achievement makes user happy and gives him a dopermine high which is why a game is addictive.
User
User is a person interacting with the game for fun and he is getting doppermine high as he wins challenges in the game. User gives his input via button to interact with the game.
Background calculation
Calculation for object moving in free space is done using coordinate geometry. And there are optimization algorithm used from game to game to improve performance of the game. such as space partitioning etc. We even use double bufffer for screen frame publishing etc.
Let me know if there is anything that I am missing since I made that game 20 years back.