Difference between targetted and targetless compilation

hi everyone…, I wanted to know how is compiling to target different
from targetless compilation(to .bin file).
What happens when we compile directly to target…?
Is it that the .bin file is created and the same is sent over programming
cable to the hardware or something else happens…?
Also, are the contents of .bin file and flash (in case of Compile to flash
and run in RAM) both same…?

Please someone help me in this regare…
Thanks for all…