DirectInput is a Microsoft API, part of the DirectX package, that is used for collecting user input with many input devices, such as the keyboard and mouse, or a games controller. The API provides users with the abilities to map a controller - designated certain buttons, bumpers or axes on a games controller with some element in the game (walking, running, aiming, shooting, steering, breaking etc.) and also handles Force-Feedback. It provides full support for any type of input device, will allow an application to retrieve data from the device even when running in the background and through action mapping, input data can be retrieved without the application (game) having to be familiar with the specific input device in use.
Xinput is basically the same thing, only that it was included in DirectX 9 for support with the Xbox 360 gaming platform instead of being used with the Windows operating system - although it can be used with Windows XP SP1 and up for Xbox 360 controllers connected to a Windows system, and is required for a number of titles regardless - and it is reportedly much easier to program for than DirectInput. A number of titles running on the Windows platform require XInput support, presumably a result of simplifying development on both the Windows and Xbox platforms. Some of the titles include Assassin's Creed, Batman: Arkham Asylum, BioShock, Fallout 3, Grand Theft Auto IV and Saints Row 2.
Other DirectX related glossary:
DirectX Media Objects