Golf Carts can either be have a gas engine, or use a large electric motor. The gas engines are typically less common, and can be either diesel or gasoline, or 4-stroke or 2-stroke. They vary a lot.
Most golf carts run on very small and very weak engines. Their engines are similar to a lawn mower's engine. Some golf carts run off of gas and others are electric.