Using libfreenect
kinect 1 and kinect 2
The two generation of kinect use different technology to get the depth information.
Gen 1 uses the structured light (light coding) and Gen 2 applies TOF(wiki). A brief explanation
Driver difference
There are two types of kinect available on the market, one is kinect for windows and the other is the normal version used on the xbox360. And note that they are using different drivers so we should pay attention to this while selecting.
Futher information can be found here.
The most widely used is OpenKinect and OpenNI.
And there are also quite some variations built out of it.
The collection of links are as follows.
But note that the maintenance of OpenNI has been stopped.