Penicillin has an anti-bacterial effect of a number of Gram-positive bacteria including but not limited to the bacteria that cause meningitis, diptheria, pneumonia, scarlet fever.  It also acts on (Gram-positive) staphylococci bacteria which cause skin and soft tissue infections such as boils.  Penicillin was also found to have an anti-bacterial action on the Gram-negative bacteria which causes gonorrhoea.  There were a series of fortuitous circumstances which combined to allow the discovery of penicillin, one of which was Sir Alexander's choice to take a holiday with his family after leaving staphylococci bacteria in a culture in his lab before departure.  Anecdotally Sir Alexander was a little sloppy with lab hygiene which contributed to his previous discovery of lysozyme and it seems the same lack of care was partly responsible for the discovery of penicillin.  Lastly the specific location of his lab and cultures played a role - the fungal contaminant that had an anti-bacterial effect on the staphylococci culture came from Sir Alexander's colleagues lab one floor below