Put the anemone where you want it to stay. Like a cat, it'll sense this and do the opposite, wandering around to the back of the biggest rock.
All joking aside, new anemones tend to move. You can encourage this by placing it in a spot where you can aim a powerhead at it, and it will almost be guaranteed to crawl off in a few days.
If you are wanting to remove it immediately, that part can be tricky and can often result in damage when you are trying it for the first time, so I'll let other experts guide you on that.
The anemone will let the rock go, eventually. Just set the nem on the bottom of the tank. Or else, the rock can act as a weight and cause injury to the nem as the nem tries to move, because it wont release the rock quick enough. Hopefully that makes sense.