What is DirectX?

If you ever have installed a game on your pc by yourself, you know that we need something called DirectX as a requirement. Have you ever wondered what that is?