Nafcillin is a type of antibiotic known as a penicillinase-resistant penicillin. It is primarily used to treat infections caused by certain strains of Staphylococcus bacteria that are resistant to other penicillins. This medication is often reserved for serious infections where other antibiotics are not effective.