speaking for web applications and microservices only
jar will normally be used with spring boot to produce a fat jar file which contains your application and an embedded server. In that case you receive a single jar file which when executed launches a server and that server hosts your application that you have developed. So 1 server 1 web application.
war and ear will normally be used when you already have a running server that hosts your applications. Then you can deploy on that existing server multiple war or ears as web applications and all of them will be hosted on the same server. Each file is smaller as it does not contain an embedded server. So 1 server multiple web applications.
You will now ask when is war used and when ear is used?
It's already answered here
answer 1
answer2
answer 3