A thin white border around the figure that I had edited appeared out of nowhere. I was able to erase it before editing the background but now I can't erase it or remember how I did that.
Does anyone know how to get rid of this line? If by setting the eraser color to the background color, how do I do that? As I get rid of the line, I'd also like to refine the figure's outline so it becomes cleaner.
Can I assume by "had edited," that you had someone else edit the image for you? If so, they need to create their mask selection one or two pixels inward from the edge of the figure, preferrably at a higher resolution than your jpeg.
If the document is multi-layered, you "could" use the eraser tool and manually erase the line on the figure layer. This is tedious compared to other methods. If the document is already flat (one layer) and you want to do it this (tedious) way, you should rather choose a small paintbrush (instead of the eraser) with the background color. Again, if the figure and the background color are not on separate layers, a better way might be to select the background color (magic wand tool or Select>Color Range...) and then Select>Modify>Expand 1 pixel, then fill with the background color. Better yet, learn about Refine Edge... to get a better selection and do the same thing.
None of the above methods is the best way, but only mentioned if the document is not multi-layered (with the figure on one layer and the background on another).
Other than those "simple" methods, to get a really good knockout selection, use the path tool and "draw" the edge of the figure, one or two pixels inside the figure, and use that as your selection, and make a layer mask of the selection, showing the selection, which will cause the background to be hidden. Then on a layer underneath, you can fill with any color. But if you had someone else do this for you, they should have known to do that way in the first place.
To further JJMack's advice:
Refine Edge is your friend.