First, you need to go to law school and pass the bar examination. While in law school, be sure to take all the classes on criminal law, evidence, and trial practice you can. An internship at a DA's office is especially helpful.
Get a Bachelor's Degree, get accepted into law school, and complete the three years of law school. Pass bar exams, and apply for a job with the district attorney's office.
District attorney's are generally elected positions. The first step would be the obvious Law School, then some experience as an Assistant District Attorney and/or public defender work.