What causes the exhaust pipe to smoke?

It depends on what color the smoke is. If it is white smoke that usually mean coolant is in the oil and that can be a result of a blown head gasket. If it is a greyish bluish color then it is oil burning. if it is black then you are burning gas.