Help ! How to use mouse clicks in a 3D world using OpenGL !

I would like to know how can I use the mouse in a 3D world. Like when I click on a 3D cube glutSolidCube(1.0); in a 3D space with the position x=0, y=0, z=0.The cube turns blue in color. Looking forward to your replies , thanks.