XInput is an API for receiving controller input like DirectInput. With XInput you can use XBox 360 controllers in your program. With DirectInput you can use every other device excluding XBox 360 controllers.
Look into the DirectX SDK for better information and reference