i was just wondering about what a game engine is. i have heard it is just a bunch of code written with functions and classes that deal with different stuff, like one class or piece of code that handles music, and one that handles input etc.
The game engine is basically the code for a game; it typically controls graphics, physics, sound, input, networking, events, AI, and so on. The full game also includes polygons, sounds, textures, levels, scripts, and whatever else is needed to create the game world.
It's not always clear exactly what a game engine is, especially in indie games which may, for example, generate levels randomly. Some engines are used across many different games, such as Valve's Source engine, while others are used only once.