What is the difference between jpg and gif?

What is the difference between jpg and gif?
Find out the difference from the latest jpg & gif of BTS (BANGTAN Boys).

↓jpg of BTS


↓gif of BTS


▲Image Source: Online Community