Before you are ever sued, it is a good idea to review your malpractice insurance contract. If you don't understand the language, which is often the case, contact your insurer for a full explanation.
The reason why this review is important is because insurance contracts often require practitioners to take certain steps prior to the actual time that a lawsuit may be initiated. Depending on your policy, you may be required to contact your insurer when you first realize, either through personal knowledge or communications with third parties, that there may be a problem. If you don't contact your insurer at that time, it may not be required to defend you should legal action occur. If you unsure about whether you have a problem, seek advice from an attorney (remember your communications with the attorney are confidential, but the fact that you contacted one could be used to show that you were aware of a possible problem) or trusted mentor. If the lines are blurry, err on side that will be most protective of you; on the other hand you don't want to contact your insurer about every incident unless you believe that the standard of care has come into question.
If you are actually sued, you should contact your malpractice carrier for legal advice. The carrier will either provide an attorney for your defense or will give you the option of selecting your own. Do not speak to anyone about any aspect of the lawsuit until you speak to your insurer, or if you don't have an insurer, an attorney or legal advocate. Make sure to take good notes and document when and how you made your initial contact to the insurer or attorney. If you receive legal paperwork through the mail or by messenger, do not put it aside. Read it immediately and call your insurer or attorney. Failure to respond could result in a default judgment against you.
The most important thing to remember is that you should stay calm. More times than not, frivolous lawsuits are filed where there is no fault. It is an unfortunate reality that litigation against healthcare providers is now becoming a regular occurrence, but it is something that you can be ready for.