DirectX is an application programming interface that allows video game developers access to a common interface that allows them to streamline development of their video games, and simultaneously make their games available to be played across a wider range of consumer hardware and software configurations than would otherwise be possible.
DirectX translates calls made to these interfaces into hardware calls that are handled by the drivers for the graphics subsystem, that in turn translate these into direct requests to the hardware, and vice-versa in translating those hardware responses back into responses that can be understood by the operating system.
DirectX is divided into many components, some of them deprecated:
DirectX has undergone many versions and revisions during its history. The first version wasn't widely used, and DirectX 2.0 was used sparsely by such titles as Microsoft Football. It wasn't until DirectX 3.0 that it became popular enough for widespread adoption by the video game industry.
After Windows XP, Microsoft stopped offering DirectX as a separate downloadable component, instead shipping it directly with the operating system, and preventing it from being upgraded except as part of an operating system update (such as a service pack) or upgrade to a later version of that operating system, which would include an updated version of DirectX.
DirectX 8.1b was the last version compatible with Windows 95, while DirectX 9.0c was the last available version available for Windows 98, Windows Me and Windows XP. Windows Vista shipped with DirectX 10, Windows 7 with DirectX 11, and Windows 8 with DirectX 11.1. Windows 10 shipped with DirectX 12 upon release. Windows NT 4.0 was only able to use DirectX 3.0a as the maximum supported version, although a beta of DirectX 5.0 was made available to it.