This question is most commonly asked on Assault and Family Assault cases, where the alleged victim or complaining witness is a friend, loved one, or relative.
Although the officer is typically the person arresting you at the beginning, the Prosecutor, or District Attorney, is the individual making the determination of not only whether to charge you with a crime, but also which crimes to charge.
After being arrested, the officer will compile police reports and other evidence taken from the scene of the crime; items like videos, written or taped confessions, physical evidence like guns, beer cans, or fingerprints, and audio recordings such as 911 calls or 911 tapes and voicemails. The officer makes a preliminary recommendation of the charges based on probable cause.
That evidence is forwarded to the district attorney, although usually only the main police reports make it in time for the prosecution to review charges prior to filing. The reviewing or filing DA examines the reports, sifting though the police officers version of what happened -- his or her investigation.
If there is sufficient evidence and interest for the prosecution to file the charges, the district attorney will file an information or complaint alleging criminal conduct alleged to have occurred. Sometimes the prosecution will follow the recommendation of the officers, and sometimes not, instead adding their own charges or allegations. Sometimes a case is rejected outright, meaning no criminal charges will be filed.
The reviewing or filing DA handles a large volume of cases, skimming each one to make a quick determination as to the proper charges and merits of the allegations. Sometimes cases slip through that should be rejected outright.
Basics of the Texas Criminal Justice System