Firefox and a lot of other applications for the Mac are distributed as Diskimages, or
.dmg.
You mount them as a disk by double-clicking them.
Once mounted it's just as any other disk on your desktop.
Do with the content of the disk as instructed. Usually a picture tells you where to drag the files to.
When done, unmount the disk. Select it and do Command-E.
You can then trash the .dmg file if you want.
Do not open applications that are on the disk. It can be done, but some applications do not like it.
Also, you cannot trash the .dmg when the disk is mounted.
You can create .dmg files with the Disk Utility Application in the Application > Utilities folder.
Practice.