You can make a background black in several different ways.
The following were all done with flash.... fairly strong flash, at that.... setting the camera so that the ambient exposure was largely eliminated, while the flash illuminated the subjects....
These two macro shots were done in broad daylight, using "full" flash at a fairly strong setting. A busy background (a tangle of leaves and branches) would have made the subject difficult to see, if flash hadn't been used to help "isolate" them.
Here a similar flash technique was used for non-macro shots...
The left hand image above of the long-tailed macaque family was shot midday in a shaded forest. The right hand image was shot in low light at dusk, plus it was overcast and starting to rain. Both were shot with film around ISO 100 or 200, at most, so flash was necessary anyway.
Sometimes ambient lighting naturally makes for a dark or black background. The two images below were shot indoors with very limited artificial light... no flash was used, but a high ISO 1600 was needed. The left hand image was illuminated only by the modeling lights in a very large soft box off to the side... the right hand images was only illuminated by a projector and the reflection of the image off the screen.
Below is an indoor example where only window lighting was used. In fact, behind the cat the background was a white painted wall, it just wasn't illuminated nearly as much. I did Photoshop away some faint background that showed in the original image. 50mm lens was used (film camera).
Also look for situations outdoors that naturally lend themselves to black or nearly black backgrounds. In the left hand image below the spider was backlit by the sun, while a distant background of trees was in deep shade. Some "gentle" fill flash was used for this shot. The right hand image of a rose bud was done without flash... simply a sunlit subject against a darker, shaded background. Notice that in both these the background isn't entirely blacked out, but is strongly blurred due to the close focus distances (Note: It's not directly related to the way the backgrounds were rendered, but both shots were done with extension tubes used on non-macro lenses, to allow them to focus closer than normally possible.... The spider image was shot with a 70-200mm zoom, while the rose bud was shot with a 50mm lens. They were fitted with a 25mm extension tube.)
Finally, if needed, backdrops of some sort can be used too. The pink amaryllis below (left) was shot outdoors in shade using a black cloth to hide an ugly gray wall that was close behind the subject. Some very weak fill flash was also used. The image of the lady slipper orchid (right) was shot indoors by window light alone, using a deep maroon, velvet backdrop that seemed to complement the flower. Both shots were done with a 100mm macro lens, although magnification isn't all that high.
Something I don't do very often is digitally remove backgrounds. To me that often looks "faked". I might retouch, as noted in one or two examples above... and I sometimes will replace a sky or do a photo composite from two or more images... but I rarely do a complete "background removal". Below is a composite, where I don't try to "hide" the fact that it's made up of two different images.... The wolf (Dakota) was photographed on film using a 28-135mm lens and with flash that conveniently made for a nearly black background. The moon was photographed a couple years later using a DSLR with 1000mm worth of lens and teleconverter. The first image was my favorite photo of her, but still needed "something". I got the idea of taking a shot of the moon and making the composite as a fitting tribute for this wonderful "wolf ambassador" after she died.