Removing a whole background from an image can be done by using an image editing program, like Photoshop or GIMP, to apply a process known as "masking." It involves creating a selection around the object you'd like to keep and filling the remaining background with transparent pixels.
To do this in Photoshop, you'll want to use the Quick Selection Tool. With this tool, you can click on areas you'd like to keep and then make any further adjustments manually to refine your selection. Once you have your selection, click the "Refine Edge" option in the top tool bar to further adjust the selection and make any necessary corrections.
Once you're happy with your selection, press Ctrl + J to copy the selection to a new layer, making sure you check the "Layer Clipping" box. This will cut the background away and keep your selection in its own layer with transparency.
In GIMP, the process is similar: you can use the Free Select tool to make your selection, then use the "Select" option in the top toolbar followed by "Save to Channel" to save the selection as a mask. To retain the transparency of the background once you have your mask, go to Layer → Transparency → Add Alpha Channel.
Removing a background from an image can be a time consuming and tedious task, so it's worth taking the time to be rigorous with your selection and masking. With that said, if you devote the necessary time and attention, you'll soon master the art and be able to remove backgrounds from images without a hassle!