DirectX is a set of libraries for Windows that allow you to run more applications. Some of software or applications may be build based on DirectX libraries and if you want to install and to use an application like this, you will need DirectX too.
Basically, is a set of programming interfaces that, once installed on your computer, will allow you to use a large variety of software and games products.
Is very used at games and is good to have it installed on computer because a lot of applications will require it.
Usually, when you do not have installed, you will receive an error that tells you you do nat have DirectX. But most of the games and software tools have (or should have) included this package and install it automatically if you do not have it.
There are many libraries made in addition for Windows operating system, like DirectPlay, Direct3D, DirectDraw, DirectSound, DirectMusic and this package includes all of them.
The first version was DirectX 1.0 released in 1995 and the newest one is from 2012 (DirectX 11.1).