We'll need more information about the bike and particularly the rear hub/wheel type. Does it have coaster brakes (pedal backwards to stop) or does it have rim brakes? Your problem is in the rear hub which should have a free wheel mechanism. It sounds as if that portion of the mechanics isn't working correctly. It doesn't have anything to do with the engine unless it is a real weird, non-standard engine installation. Some pictures would be very helpful.
Tom