Penicillin is a metabolic product of the mould penicillium notatum. A structure include a b-lactam ring with four members which gives it the specific potency.
As can be seen below, penicillin chemical structure how’s the alterations of the side chain (R), which can lead to formation of many derivative.
Chemical structures of penicillin

Penicillin mode of action
Penicillin work by inhibiting wall synthesis by combining with the transpeptidase responsible for cross-linking of the peptidoglycan. It is bactericidal, and the activity is dependent on the intact b-lactam ring.
Antibacterial spectrum of penicillin
It varies with individuals penicillin. The activity is determined by the side chain (R) all the penicillin nucleus. Penicillin is in activated by acid.
Penicillin resistance
Penicillin-resistant is common because the productions of an enzyme b-lactamase (penicillinase) by some bacteria. This enzyme inactivate penicillin by acting on the B-lactam rings. The enzyme b-lactamase is plasmid associated in many cases.
B-lactamase producing bacteria include a large majority of staphylococcus aureus, haemophilus influenzae, and Neisseria gonorrheae. Penicillin can also elicit allergic reactions of varying severity.
Derivative of penicillin
The side chain (R) attached to the B-lactam ring can be chemically altered to form derivative of penicillin.
Below is image of Penicillins Derivatives

The resulting penicillins may have a brother antibacterial spectrum e.g., ampicillin; or may be resistant to enzyme penicillinase, e.g., methicilin, and cloxacillin; or may be relatively more resistant to acid so that it can be administered orally e.g., penicillin V or oxacillin.