See the man page for `mount`: https://linux.die.net/man/8/mount (search for "loop")
Here's what the flow looks like:
open(/path/to/myfile) ->
ext4 driver ->
block operations on /dev/loop0 ->
open(/path/to/loop-file) ->
block operations on the data region of the file ->
btrfs driver ->
block operations on /dev/sda
See the man page for `mount`: https://linux.die.net/man/8/mount (search for "loop")