If your car currently uses halogen bulbs, you can replace them with HID bulbs by buying and installing an HID conversion kit. However, these kits are not legal everywhere and may cause problems after installation.
Halogen bulbs, which are standard on most older and some newer cars, have a different fitting than XID bulbs. They also have lower voltage requirements, so XID bulbs need an extra power source. This is called the ballast and needs to be fastened to a flat, protected surface near the headlights.
Once you have fastened the ballast to your car, plug the HID bulb into the ballast and fasten the other end of the ballast into the car's wiring system. Be sure to buy the right kit for your car's make and model, as the plugs vary in size and shape. As you plug everything in, make sure that the wiring is a safe distance away from all moving parts in the car to prevent damage.
There are ways to get a similar look to HID bulbs without complex converter kits. Several types of halogen bulbs, such as Street Glow White Xenon, look like HID bulbs but fit into halogen sockets. Consider replacing the whole headlight capsule with a higher quality option as well. Even simply removing the haze from the headlights of an older car can make it brighter and more effective.