The putting green is one of the five defined areas of the course. It is an area specifically prepared for putting, which means you have some special permissions here, including the ability to mark, lift and clean your ball any time. To mark and lift your ball, you must use a ball-marker, which is an artificial object like a coin or tee. You are also permitted to repair most damage (other than natural wear) on the putting green, including spike marks, and remove sand and loose soil – even when your ball is off the putting green.
Once you have marked, lifted, and replaced your ball on the putting green, your ball owns that spot. So if it moves for any reason, you will replace it without penalty. If you have not marked, lifted, and replaced your ball, whether you replace it or play it from its new location depends on the cause of the movement. If you or anyone else accidentally causes your ball to move, replace it. If wind or another natural force causes it to move, play it from its new location. There is no penalty in either case.
The Committee decides the hole location and, while there is guidance, there is no such thing as an illegal hole location.