Typical bacteria are classified by the way they react to a dye. The method is called gram staining because its the last name of the doc who invented the method of classification.
They take a violet dye and inject it onto the organism in question. If the dye turns violet, then the organism is gram positive. If the dye turns pink and none of the violet crystals are absorbed, then the organism is gram negative.
Gram positive bacteria have a much thinner wall than gram negative, which makes them easier to treat. Also many gram negative organsims are anerobic, while gram positive are generally aerobic.
Typically antibiotics will work more effectively against one or the other type. When someone says "broad spectrum" they are referring to an abx that is effective against both gram negative and gram positive organsims.