There are a few ways to do this.
1 - Get a true macro lens
The highest-quality (but most expensive) way is to buy a "true" macro lens. Purists regard a "true" macro as a lens which can focus a subject at 1:1 scale. The scale is based on how large the image is on the camera sensor. Here's an example: A penny is about 19mm in diameter. The sensor on a DSLR with an APS-C size sensor (the vast majority of DSLRs) is about 14mm tall by 22mm wide (roughly). That means that at 1:1 scale, a penny would not completely fit within the frame of the sensor. The width would fit with a tiny bit of room to spare, but height-wise the penny would be slightly cropped. So that's pretty close.
Canon (and as far as I know, _only_ Canon) actually makes a special purpose macro lens that can do 5:1 scale (image on sensor is up to 5 times larger than the subject is in real life.) That's the MP-E 65mm. The "catch" is that this is a special-purpose macro lens. Nearly all macro lenses can also be used as ordinary prime lenses (they're not just for macro work exclusively). They focus from that very close 1:1 scale distance out to infinity. But the MP-E lens from Canon can _only_ do macro work. It's near-focus is 5:1 scale and it's far focus is 1:1 scale.
There are many zoom lenses which also claim to be "macro" zooms. This is the "marketing version" of macro and not what a purist would regard as a macro. These lenses usually can only focus to maybe 1:3 or 1:4 scale.
When you get really close to a subject for that minimum focusing distance, the shadow of your lens, camera, or even your body might be altering the light on the subject. For this reason, longer focal length macros are usually preferable. A longer focal length also means that if you are trying to take a macro shot of a skittish critter, the critter might not run away when the lens looks like it's so close that it's about to be squashed.
True macro lenses are prime lenses with very close minimum focusing distances, but ALSO they usually have particularly good resolving capability (the "MTF" score of these lenses is usually very high.)
2 - Get extension tubes
Extension tubes really are just "tubes". It's a barrel that mates onto your camera body (where the lens attaches) and then your lens mounts to the other end of the barrel. The reason it's called a "tube" is because it doesn't contain any glass. It's completely hollow. It's job is to move the entire lens farther away from the camera -- thus changing the back-focus distance on your lens. By doing this, the "closest focusing distance" of your lens will be reduced -- but the catch is, so will the "farthest focusing distance". In other words, you will find that your lens can no longer focus all the way out to "infinity" when it's mounted to the extension tube.
The extension tubes only technology is that they do pass-through the communication pins so your lens and camera body can still communicate, and the better ones actually report that they are present (so the camera knows there's an extension tube in use.) Apart from that, the air inside brand 'a' is generally just as good as the air inside brand 'b' (as there are no "optics" in these things, image quality will never be a question of "which one is best".
Since you can put an extension tube on any lens, and "any lens" usually doesn't have optical quality quite up to the standards of a good macro, you might notice that the detail isn't quite as good IF you are a pixel-peeper. However... there are a LOT of "macro" photos that you've undoubtedly seen in your life with astonishingly high quality that would have been photographed with a relatively ordinary lens... and an extension tube.
Extension tubes come in various lengths and are also sometimes sold as "sets" (the longer the tube, the more it reduces the minimum focusing distance. You can "stack" them.)
Extension tubes are not particularly expensive.
Some people will use a true macro in combination with extension tubes for even closer macro work.
3 - Get Close-up diopters
Close up diopters look like filters. They "screw on" to the filter threads on the end of your lens -- just like you'd do to attach a polarizing filter, neutral density filter, or any number of other filters (e.g. UV filters... which don't actually help because all digital cameras already have an internal UV filter, but that's a different thread.)
The diopter works quite a bit like attaching a magnifying glass to the end of your lens. In fact... it's so much like attaching a magnifying glass to the end of your lens that it even has the same problems you would have it you _really_ attached a magnifying glass to the end of your lens.
They work and they're probably the least expensive way to get "close-up" shots. They come in different strengths and you can even "stack" them for stronger levels of power.
But there is a downside to these. A lens element, by itself, looks like a magnifying glass. If you look at the cross section of the lens shape, the center is thickest and it tapers to a thin edge. That tapered shape means that as light passes through the lens surfaces it will bend. The refraction is desirable because that's what magnifies the image. But along with "diffraction" you also get "dispersion" ... "dispersion" is what a prism does when you shine a white light through it. It splits the light into a rainbow spectrum. Different wavelengths of light will diffract by different amounts such that no all "colors" actually focus at the same distance from the lens. The dispersion is almost non-existent in the very center axis of the lens, and very strong at the outermost edges. That means you'll see color fringing (color fringing is called "chromatic aberration" or just "CA" for short) in the details near the edges of your frame... objects in these areas of the frame will have a reddish glow (or "fringe") on one side and a blueish "fringe" on the other.
Hold a magnifying glass over a piece of fine newsprint in a nice brightly lit area and you'll notice that the print in the center of your magnifying glass looks large, sharp, and good. But at the edges of the view the text is beginning to distort, you see "color" (red & blue) even though you know the newspaper is really black & white.)
All lenses technically have this problem, but the reason you don't usually notice it is because lens makers arrange the elements within the lens into a configuration known as an "achromatic doublet". The doublet configuration tends to greatly reduce the level of CA.
Canon actually makes two different close-up diopters that are quite a bit thicker and they actually contain multiple elements (they actually have achromatic doublets in them.) They give the very best image quality you can get from a close-up filter... but they're not cheap. I bought one for my Canon G1 X (a high end point & shoot) and I seem to recall it was about $130 for the close-up diopter (not a set.) That's _very_ expensive for a close-up filter (which are usually less than $25).
4 - Get a Reversing ring
I've never done this particular method so I can't speak to all the ins and outs of it. But a reversing ring lets you mount a lens to your camera BACKWARDS. On the front of your lens, you'll notice you have filter threads (the diameter varies by the lens, but most lenses have them.) The back of your lens has the mount required to attach to your camera body. The reversing ring lets you attach the lens backwards. It's a simple ring which attaches to your camera body on one side, but the other side of the ring has "filter threads". You screw the ring onto the front of your lens, and then attach it to your camera.
As the lens is mounted backwards, there is no communication with the lens and body. You cannot control aperture. The lens will not auto-focus. You have to control the exposure using only shutter speed & ISO and focus the lens manually.
The reversing ring is cheap.
No matter what you get... get a tripod. The depth of field can be so incredibly thin that if your body moves so much as a millimeter between the time you focus and the time you shoot (something which is extremely likely if you're a living-breathing person) you'll get soft focus on your intended subject. People who regularly shoot macro also buy a focus rail.