I assume you want to use it to enable the user to click somewhere and know where in the 3D world they clicked?
In that case, it's pretty simple. You use:
null=PICK OBJECT(mousex(), mousey(), 1, [whatever your highest object number is])
Imagine that when you use this command, the program shoots an invisible ray from the camera toward the point the mouse is pointing at. You use GET PICK VECTOR X(), GET PICK VECTOR Y(), and GET PICK VECTOR Z() to get the coordinates in 3D space where the ray hit an object.
Alternatively, you can use PICK SCREEN instead of pick object, which instead of stopping when it hits an object, stops when it reaches a certain distance from the camera.