2d Position to 3d Position

How can you tell what gameobject the player's mouse is pointing at?

If you want to use a raycast (or only check on a particular frame, rather than needing to attach that script to every object), you can use this simple script (reposting from another answer):

function Update ()
{
   if ( Input.GetMouseButtonDown(0) )
   {
      var hit : RaycastHit;
      var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
      if (Physics.Raycast (ray, hit, 100.0))
      {
         Debug.Log(hit.collider.gameObject.name);
      }
   }
}

You should be able to use the OnMouseOver event.

From the documentation:

function OnMouseOver () : void Description

OnMouseOver is called every frame while the mouse is over the GUIElement or Collider.

Have this function present in a script that is attached to every gameobject that you want to know if it is pointing at.