There is no difference. Both are internal combustion engines. I think I know what you're asking though. A gasoline engine uses spark ignition and a diesel engine uses compression ignition. The gasoline engine needs an spark or other heat source to ignite the fuel air mixture in the cylinders. The diesel engine ignites the fuel air mixture by compressing it in the cylinders until it combusts from the heat produced when the cylinder's volume is decreased.