If you became a conditional resident of the United States (a two-year green card holder) based on your marriage to a U.S. citizen or permanent resident, then in order to remove the conditions on your residence, you would normally need to file Form I-751 jointly with your spouse. The application window for this is anytime during the 90-day period preceding the expiration of your conditional resident status. However, these normal filing requirements do not apply to you (they can be "waived") if, during the marriage, your spouse physically or emotionally abused you or your child. (Abuse prior to the marriage doesn't count.)
In such a case, you will be allowed to file Form I-751 alone, without needing to involve your abusive spouse in the process. What's more, you don't need to wait to file this form until that 90-day application window opens (and can still file it even after that window closes). U.S. Citizenship and Immigration Services (USCIS, the immigration authority) will accept the I-751 petition at any time prior to your deportation ("removal") from the U.S., whether your marriage has ended or not. You will, however, still be required to show that the qualifying marriage was entered into in good faith.
Filing your I-751 early might help you get out of an abusive situation. Let's look closer at how to do this. (Also see 8 C.F.R. § 216.5.)
Before attempting an early I-751 filing, take the time to build and gather supporting evidence. For example, it's good to write up a detailed account of your abuse and, if you have not already done so but believe you can proceed safely, get help from the police, the courts, medical personnel, licensed therapists, social workers, school officials, and/or clerics, if you are religious. These institutions and figures will provide you not only with the care and protection that you need but also with credible official records to document your case.
Evidence that you sought shelter for domestic violence victims could also make your claim more plausible. However, USCIS understands that victims of domestic abuse are not always in a position to take such concrete self-protective steps. So, if you are still living with your abuser, USCIS will not necessarily hold this against you. Likewise, if you are still married to your abuser, this should not (by itself) lead USCIS to deny your abuse waiver request.
For details on filing procedures, see Filling Out Form I-751 With a Waiver Based on Abuse or Battering. And for more details on useful sorts of documents, see Checklist of Documents to Submit to USCIS to Prove Abuse for VAWA Green Card.
If you chose instead to obtain a divorce (and even to marry someone else), rest assured that this will not automatically hurt your case; though it could cause USCIS to try to terminate your status early.
It also makes you eligible for a separate divorce waiver. This is an alternative process that will require only showing that your marriage was entered into in good faith. It will spare you the distress of revisiting and exposing the painful memories of your abuse.
But, though this option might on the surface seem preferable to the abuse waiver process, remember that obtaining an abuse waiver to remove the conditions on your residence would carry its own benefit. In particular, it could speed up your eligibility for naturalization. (See When VAWA Green Card Holders Can Apply for U.S. Citizenship.)
For details on how to prepare this filing, see Divorce and Your Conditional Residence Status: How to File a Divorce Waiver With Form I-751.
You could make your life easier by hiring an experienced immigration attorney to handle it. The attorney can analyze the facts of your case, identify spot any potential problems, prepare the paperwork, and monitor the progress toward approval. If your income is low, check with local nonprofit organizations serving immigrants, or look for low-cost or "pro bono" (free) help.