How is transparency stored?
Besides color information, PNG and WebP can store transparency separately. That is why a logo or icon can have a transparent background and sit naturally on any color.
JPG, on the other hand, has no way to store transparency. When you convert a transparent image to JPG, the formerly transparent areas have to be filled with some color, and they are usually filled with white or black. That is why you sometimes end up with a background after converting to JPG.
Which format should you use?
Keep images that will be placed on other backgrounds, such as logos, icons, stickers and cut-outs, as PNG or WebP. For photos that do not need a background, JPG is better for file size.
For a transparent image going on a website, WebP is smaller than PNG and better for speed. Some older programs may not be able to open WebP, though.
If you really must convert to JPG
If the recipient accepts only JPG, check what the background turned into after conversion. A white background is usually fine, but a black one can make text or a logo invisible.
If the background color matters, the safe approach is to place the image on a background of the color you want before converting.
What about converting JPG to PNG?
Converting a JPG to PNG does not make the background transparent, because it is already filled with color. The file just gets bigger without any improvement in quality, so avoid it unless you need to.
Making a background transparent needs a separate background-removal step. Remember that converting a format only saves the information that is already there in a different way.
If you keep switching formats back and forth, a JPG loses a little quality at every save. Keep the original and convert just once when you need to.