How to switch an image between PNG and JPG
For a smaller file use PNG to JPG. To edit without further loss, use JPG to PNG.
A quick example
A 6 MB PNG screenshot of a web page often comes down to under 1 MB as JPG. The other way round, a 2 MB JPG can become an 8 MB PNG, with no extra detail.
What can't be undone
JPG throws away a little detail for good. Keep the original if you might need it.