How loop and ad hoc works in an expanded sub-process

Hello Community,

I’m currently in the process of learning how to design sub-processes, and I’ve encountered the concepts of adhoc and loop.
I’m seeking further clarification and guidance on these concepts to enhance my understanding.
If anyone has insights or resources to share, I would greatly appreciate it.
Thank you!