Usually, the "code" side of a game manages the following (and much, much more; to simply answer your question, I'm just gonna scratch the surface in a way I hope you understand):
- It forms a list of verticies (positions in 3D space, like "X: 30.4382, Y: 80.715, Z: 1.2"), as well as information on how to connect these positions, in groups of 3, into triangles. Thousands of those triangles make up the scenes you see in video games. This is the same as what Robert Rouhani is referring to (phrased my own way). The question of "Why triangles?" is an interesting one - to put it simply, triangles will always form a flat plane, whereas it's possible to "twist" a fourth vertex, so that they don't quite make a square.
- It decides how and when everything happens in the game. It takes some mental rethinking to visualize it, but on one level a game represents its information in a terse, computer-understood way (like "
Player is located at
X: 30, Y: 80, Z: 1.5") and a seperate level of code determines how to show that information on the screen (for instance, that
Player consists of hundreds of triangles - something the game's logical level doesn't even care about)
- Code needs to keep everything running based on time; a game needs to be able to update itself correctly based on however much time has passed since the last time all its logic code was run. Usually, it's a matter of a millisecond or so, but if something slows down the game for just a moment, it needs to react correctly, and manage its state based on however much time it just missed.
I admit there may be some things that are 'technically' incorrect about my summary here, but I hope this is enough to try to explain what you're looking for. The most basic answer is that most of a game's code instructions tend to be written in C++ (though sometimes, a developer will use a second language in addition to C++, to make writing their game a bit simpler)