Getting the Mouse pos in 3D World

How can I go about getting the position of the mouse in a 3D world like if you were to click to walk to a tile or position, getting the x and y of the mouse click in the map.

It is hard to answer that without knowing what exactly you mean by a “3D world” and what, if any, libraries/frameworks you are using.

However if I understand you correctly, you would just detect the x/y pos of the mouse the same way as a 2D game.
The position of the mouse is relevant to the game window; and the position of the mouse only has 2Dimentional coordinates.

This is ‘unprojection’ or ‘ray picking.’ Use those terms with some google-fu.