This will be a particularly stressful time for you. Nonetheless, you need to keep your wits about you. There are several things you need to do:

  1. If you're called in to meet with your boss or HR, and you suspect that you're about to be terminated, be polite and professional.
  2. If you can, take complete notes to document what is said and take them with you. If you can't take notes right then, make it the first priority to write everything down as soon as you can. That means within hours, not days, while things are still fresh in your memory.
  3. If you think that you're being fired for an unlawful reason, such as illegal discrimination, tell them about it right then and there. You shouldn't argue about it, but get it on the table.
  4. Do not sign anything without having it reviewed first by an attorney unless you're merely acknowledging receipt of the document (and sometimes even that is not a good idea). 
  5. If you're offered a severance agreement, you will probably have 21 days (sometimes 45) to get it reviewed, sign it, or try to negotiate a better deal. You need to move fast. Find a qualified employment lawyer and set up an appointment to discuss the situation promptly. While we love to hear from people who need help, our biggest frustration is with folks who call and say "I got a severance offer and I need to sign by tomorrow."  There's often nothing a lawyer can do to help in that situation. You have effectively painted yourself into a corner. 

If you take nothing else from this, make it a point to seek legal help right away if you think you might need it.