When you are shooting within a few inches (or centimetres) of your subject your digital camera will make a poor job of focusing on the subject unless you use its macro setting.
Macro is indicated by a small flower icon on a dial on your camera or configurable within its menu system.
The macro setting ensures the camera will focus on an object which is only a few inches or centimetres from the camera. Use this setting when shooting a close up of a flower or an insect in the outdoors or when capturing detail indoors like objects on your desk.
If you’re using a digital SLR you won’t generally find a macro setting on your camera and the lens that it came with probably won’t focus well enough to get good close up shots.
Instead, consider investing in a telephoto zoom lens with a macro setting so you not only get a good telephoto lens but it doubles as a macro lens too.
One benefit of this setup is that you can stand back from your subject and still get in very close to the subject so you don’t scare small insects.