File extensions

What is a .rar, .heic, .apk or .dwg file and which free program opens it on Windows, Mac and Android.