CNG is basically composed of methane whereas LPG is a mixture of propane, butane and other chemicals.
Another important difference from a physical point of view is that
CNG does not liquefy under high pressure - it remains a gas, unless it is cooled down to at least - 164°C. LPG on the other hand becomes liquid when it is compressed or when it is cooled down (therefore the name "Liquefied Petroleum Gas").
CNG directly comes from a gas field. The only process, which sometimes needs to be done, is filtering the gas. But usually, the gas can be used as a fuel right away after the compression process. LPG, however, is an artificial product. It is a mixture of the above-mentioned gases. Hence, these gases need to be blended, before they can be used as fuel.
CNG has a greater part of Hydrogen and is therefore lighter than air (this attribute in fact makes CNG very safe: once there is a leak in the system, the gas will simply be released to the atmosphere). LPG on the other hand, is twice as heavy as air. This gas is usually a by-product which accumulates from the oil drilling as well as the refinement of oil.