The most common cause for thread being terribly tangled ***inside*** the machine is that either the bobbin tension is too high or top thread tension is too low as picked up by https://www.ifixit.com/User/3130877/Lyra_Wats,
The tangle may be so bad that the tread (and part of the sewn fabric) may have to be cut out in order to free the piece. This can be avoided by monitoring the advance of the fabric when sewing. If it abruptly ceases, stop immediately before the bundle underneath the foot plate becomes too large to be withdrawn by hand.