If your I-130 petition is denied you may still have options to overcome the grounds for denial. First of all, before acting you should understand the reason for your Form I-130 denial.
In case the denial was caused by some mistakes/omissions in your petition, for example, failure to submit the proper evidence, it may be sufficient to simply submit a new corrected Form I-130. There is no rule that prevents you from filing a new visa petition for the same relative again.
In other cases, you will have to turn to an immigration attorney and file an appeal with the Board of Immigration Appeals. Such cases include, for example, the determination by USCIS that the family relationship is not valid or that the marriage is not genuine.
Anyway, denial of I-130 petition should be taken seriously as sometimes it can become an obstacle to filing any future petitions by the same petitioner and/or beneficiary.
The best way to prevent denial of Form I-130 is to make sure that the petitioner and the beneficiary meet the eligibility requirements, and to submit a duly prepared petition accompanied by supporting documents and sufficient evidence.