Recognize x,y,z

I need some help. I click mouse (screen x,y coordinates)and I need X,Y,Z hit (not an object I hit). How to do this ?

If you don’t have additional constraints you’ll have an infinite number of solutions. All the triplets (x, y, z) that are on the line perpendicular on the screen (the near plane) and passes through the point (x, y) can be solutions.