No evidence has yet shown a definitive link between MJ smoking and lung cancer. But MJ smoke contains many of the same known carcinogens as tobacco smoke, or smoke from burning ANY kind of dried plant material, for that matter.
The lack of cancer in pot smokers then would seem to come down to a few key differences:
The amount of material being smoked. Even the heaviest pot smoker is going through a LOT less material and inhaling a LOT less smoke than your typical tobacco smoker. A pack of cigarettes is the rough equivalent of an ounce of pot as far as the amount of material being burned and inhaled. A pack or more a day cigarette habit is pretty common, but smoking that much pot per day would be pretty much incapacitating for most users.
Tobacco is typically treated with all kinds of additives, burn rate modifiers, flavorings, "impact boosters", etc. Marijuana is just dried flowers.
The tobacco plant has a natural tendency to sequester radioactive material from the soils it is grown in. Commercial tobacco is usually grown using rock phosphate as a fertilizer, which contain trace amounts of polonium, uranium, radium, and thorium, all of which stay in the leaves and are inhaled when the tobacco is smoked.
In the lungs, nicotine acts like a bronchoconstrictor, tightening up airways and paralyzing the cilia of the lungs, reducing their ability to sweep out and remove deposited particulates from the smoke. THC and other cannabinoids are bronchodilators, which may enhance the ability of the lungs to "self clean" to some degree after smoking.
Many of the cannabinoids also have documented anti-cancer properties in and of themselves.