Write a supplemental essay to attach to your application where you can explain the circumstances of your poor grades. In the first part of the essay. just present the facts in a straightforward manner. In the next section, explain how you remedied the problem and in the final part of the essay tell what positive lessons you have learned from the experience and why you won't make the same mistakes again.
Obtain letters of recommendation from teachers or guidance counselors who can vouch for your improved study skills or circumstances. Having someone who knows how you struggled to get your grades up, or why you struggled in the first place, and can still recommend you as a good candidate for their school is quite valuable.
Retake failed classes or those with poor grades, either at your high school or a local community college if necessary. This can show both ability as well as initiative.
Consider attending a junior college for a year or two before transferring to a more demanding university. You may also consider a college with an open admissions policy where poor grades won't keep you out.
Take a gap year. Do volunteer work, travel, do some self-directed studies, join a community theater group or rebuild the engine of your classic car. Whatever it is, write it up in your subsequent application essays highlighting the value of your experiences.