So I was just curios about programming in game engines and was wondering, what does it actually do? This question is very broad I know but tell me anything to just give me an idea.
Short answer: Everything you see in a game.
Perchance you've heard of Wikipedia? They have a huge page on game engines.
Games engines are higher level functions, above Opengl or Directx and low level sound, you can call with a scripting language, usually. A few still use c++ to call the functions.