Oxacillin is an antibiotic in the penicillin group of drugs. It is used to treat many different types of infections caused by bacteria, such as a staphylococcal infection.It may also be used for other purposes not listed in this medication guide.