A desirable effect when taking macro shots is to have a blurred background so attention is drawn to the main subject.
This artistic photographic effect, known as shallow depth-of-field, means a subject is in focus but objects in front and behind it appear out of focus.
Obtaining shallow depth of field
The degree of depth-of-field is controlled primarily by the camera aperture. Using lower f-stops (larger apertures) decrease DOF.
Other factors that affect depth of field are the distance you are from a subject and the focal length used.
Use aperture priority mode if you’r camera has it, and change the aperture manually. Or switch to macro mode.
Many photographers us dedicated macro lenses, macro converter lenses or close-up filters for macro photography.
Where to focus
When taking macro shots, always focus on the area of the subject you consider most important, otherwise it may appear out of focus. This is critical when using a digital single lens reflex camera since depth of field is shallower than compact digital cameras.