Imagine a situation when you have table1 and table2, each having a foreign key to each-other with on delete cascade specification.
In this situation, if you try to delete a record from table1 that is referenced by a record from table2, then the RDBMS will try to remove the record from table2. Yet, if the record in table2 is referenced by a record in table1 (especially if it is the initial record), then this triggers a removal from table1. So, r1 triggers the removal of r2 which triggers the removal of r3. Yet, if the pattern of records to be removed gets repeated (infinitely) many times, then you get into an infinite cycle.
The above is the simplest way of an infinite cascading loop of record removal, in more general terms
you have table1, <0 or more tables>, table1 where each table cascades removal on the next table, resulting in an infinite cascading loop of record removal.
This is the type of issue the error is warning you about and it suggests that you should change the on delete behavior to no action. That would technically prevent this error from occurring, yet, understandably, you may want to trigger removals.
A neat way of doing it might be to have an
on delete set null
and add after update triggers to the tables you change this way so if the given foreign key becomes null, then it is removed. I did not test this approach and it's unclear what RDBMS you use, but it's worth trying.
If all else fails, then you can implement a stored procedure that does the cleanup and call that stored procedure.