What is HEIC?
HEIC is what an iPhone saves photos as, and it is not really an image format so much as a container holding HEVC video frames - the same codec used for film, applied to one still picture. It stores a photo at roughly half the size of the equivalent JPEG, which is why Apple switched to it, and it is also why so little else opens it: HEVC is patent-licensed, so most browsers and a good deal of desktop software cannot read a HEIC at all. Large photos are usually stored cut into tiles that have to be reassembled, not as one picture.
What is JPG?
JPEG is the format photographs live in. Its compression is lossy - it discards detail the eye is bad at noticing, and discards a little more every time the file is re-saved - which buys enormous size savings on photographic images and makes a mess of screenshots, logos and text. It has no transparency.