The germ. Bacterial pneumonias are caused by a germs called bacteria, for the most part they can be treated with antibiotics. Viruses cause similar pneumonias, since viruses are biologically very different (they live and reproduce by invading a normal cell and incorporating into the cells dna for example) antibiotics do not work, with rare exceptions. (like flu) symptoms of both are similar though.
Treatment different. A bacterial pneumonia is treated with an antibiotic active against that particular germ. A viral pneumonia requires an anti-viral agent with activity directed against the causative virus. The symptoms of both are fever, cough and production of phlegm, and both have a cloudy abnormality seen on xray. Culture of phlegm that is negative for bacteria suggests a viral cause of the infection.
Predominantly cause. One is produced by bacteria, and usually we find the alveoli (tiny air sacs) filled with inflammatory material showing as consolidation on imaging studies, whereas in viral infection the tissues lining the air spaces are more involved and appears as a reticular pattern on imaging. Both can show overlapping pictures.