The Locator is a new gadget added in the 1.4 update. It is similar to the compass in appearance, but it is yellow in color. It's function is to place a waypoint at the block it is aimed at, doing so will use a portion of it's durability. You activate this by pressing right trigger; this will bring up an enter text screen and you can name it whatever you want. The waypoint made by the locator will only appear on screen while holding the locator and within visual distance of the waypoint. The locator displays the distance to the waypoint, while the needle on the locator itself indicates in what direction the waypoint was placed.
The locator is a very useful device for finding your home base or a hard to find location that you would want to come back to. Locators are also useful to mark the exits of caves so you don't get lost. While moving with a Locator, its durability is slowly depleted, so it is recommended to move only several blocks and then switch to something else in your hotbar.