The smoke is due to exhaust escaping from the plane's engine. Some aerobatic planes have a tank where they can store liquid to produce the smoke. Normally it is paraffin oil, or in its absence, diesel. When the pilot turns on the smoke system, the paraffin is directly injected into the exhaust pipes and this, as it comes in contact with the high temperatures, burns and produces smoke. In order for the smoke to have a color other than white, dye is added to it.