It helps if you know someone on the department who knows you and wants you to work there. Contact the department's hiring office to determine the procedure of that department. It might be involved, including lengthy paperwork questionnaires, multiple tests, eligibility lists, and interviews. Or it may be enough to just know someone. Generally the larger the department the lengthier the process. Ask yourself, why this department (they are all very different), what do you have to offer over most other applicants, and just as important, what is going against you; mental & physical state, personal history including drugs use, traffic accidents, criminal associations, lifelong neighborhood reputations, and much more. Ask yourself why do you want to wear a badge. Frequently, an honest answer may preclude your being eligible. Your officer's discretion may effect many lives, and you would be a trusted arm of the government, with a tool to end human life on your hip. The closest job to a police officer is the military (discipline) and social worker (helping to solve serious problems among people). Do you wish to devote your life to working daily with horror and degenerates and witnessing the worst humans do to each other? And never earning very much money? And being hated by so many? Think well. A university B.A. in Criminal Justice and being a military veteran can help, but are you what they need? Even your gender, race, ethnicity, and location of residence can matter. I hope that this helps.
An "E" in history isn't going to help! I suggest you complete high school with a reasonable good GPA. Attend college and finish you Batchelor's degree! Complete the police academy and start applying agencies you are interested in. I would suggest you take part in a ride along program, or a scout explorers program to see if you feel that this should be the career for you.
First, you need to go to a police academy for around 12 weeks, but before you can do that, you need to have a "law enforcement" type job to be eligible. Go and be a Corrections Officer or a Dispatch at your city jail or county jail, then once you stay there for a while, then put in for the academy. Good luck :)