A player must take extreme care not to move the ball accidentally as it carries a one-shot penalty.
This does not apply on the tee - where the ball is not in play until after it is struck.
The player also has more leeway on the green - where if a player moves the ball while marking it or brushing away debris he or she is allowed to replace it without penalty.
But everywhere else if the ball is moved in the following ways, the player incurs one penalty stroke.
Accidental - dropping a towel on the ball, treading on it, hitting it on a practice swing, removing debris - for instance a twig or leaf
At address - if the wind moves the ball once a player has addressed the ball he is deemed to have moved it
The only exception to this is when the ball is hidden beneath leaves or sand in a hazard. If the ball is then moved accidentally, it can be replaced it its original position without penalty.