What Is a Golf Ball Marker For?
A golf ball marker identifies the spot of a ball that will be lifted and replaced. On the putting green, mark the spot before lifting, replace the ball on its original spot, and remove the marker before playing.

Put the marker beside the actual spot
The Rules of Golf specify placing a ball marker immediately behind or immediately next to the ball. Choose a consistent position so you can replace accurately. A marker somewhere nearby does not establish the correct original spot.
Use an appropriate object
A coin or a purpose-made ball marker is a practical choice. The rules define a ball marker as an artificial object; a loose leaf is not a substitute under that definition. Keep a marker accessible before reaching the green.
Finish the replacement sequence
After replacing the ball, pick up the marker before making the stroke. Do not use the marker as a reason to move the ball to a preferred patch of grass. Marking preserves a location; it does not create a new one.
Do not apply this everywhere automatically
Possessing a marker does not give permission to lift a ball anywhere on the course. Different situations have different lifting and relief procedures. If you are unsure whether lifting is allowed, check the applicable rule before touching the ball.
Sources
Related reading
How to Choose Socks for Long Walks
Warm-Up and Cool-Down, Explained