Peptidoglycan is formed by the linkage of molecules of NAM ( N-acetylmuramic acid) and NAG (N-acetylglucosamine) into a polysaccharide structure. Many of these structures are then formed into a lattice by crossbridges of polypeptides. In gram + bacterial cell walls many layers of this lattice are stacked up forming a rigid structure, that is external to the plasma membrane, and provides more resistance to osmotic lysis than the plasma membrane alone posesses.
Penicillin interferes with the final linking of the peptide crossbridges which results in a weaker cell wall that will make it more likely that the cell will undergo osmotic lysis.
Gram - bacterial cell walls are quite different than gram + cell walls. They do contain peptidoglycan but the peptidoglycan layer is thinner - only one, or very few, layers of peptidoglycan with some structural differences also. Therefore, gram - bacterial cell walls are weaker than gram + bacterial cell walls.
"Microbiology, an introduction" Tortora, Funke and Case 11th EDition pp 84-86