When you break a right-of-way rule, you can exonerate yourself by taking a Two-Turns Penalty (see rule 44). Almost every sailor knows that you must take this penalty by "promptly" making two turns. But before you make those turns, you have to "get well clear of other boats as soon after the incident as possible." A common mistake after fouling is to begin making your turns immediately without looking around. But this leads to two potential problems:
1) You can easily foul another boat and then you will have to take a second penalty. Remember that while you are taking a penalty you must keep clear of boats that are not taking penalties (see rule 21.2).
2) You may have to abort your turns in order to keep clear of other boats. This is not only slow, but also may require you to start taking your penalty all over again (if you don't take it 'promptly').
To avoid all this, take a good look around before you begin spinning. You are entitled to time to sail well clear of other boats after the incident (as long as you do that as soon as possible), so first make sure you get to a place where you can make fast, uninterrupted turns.