DirectX is an Graphics API used to interface with CPU and GPU hardware and latest DirectX 12 is much more explicit and low level control over the hardware, it is used to write graphics applications for windows and Xbox.