We use "MIDI loop" to refer to a feedback loop where outgoing MIDI triggers incoming MIDI (from your MIDI target) which triggers another round of the same until your device crashes or becomes unresponsive (MD has a lot of protections in place to never crash in performance mode).
The simplest example is a supercontrol in MD that receives MIDI and causes a subcontrol to send out. In your MIDI target, that outgoing MIDI causes another message to be sent to MD... which in turn causes another message to be sent out.
There are a lot of ways to diagnose this, but using the MIDI log -- or an external MIDI log if you can go through a computer, for instance -- is an important tool. At the same time, don't discount guessing and testing (which scientists call "hypothesis testing").