For bacterial meningitis, it is important to know what type of bacteria is causing the meningitis. Antibiotics are used to treat bacterial meningitis and can also prevent some types of bacteria from spreading and infecting other people.