How is a drum different from a guitar?

At the most fundamental level, it isn't. They both generate sound by perturbation of air caused by vibration. Other than that, though, they're quite different. Guitars cause sound by virtue of the vibration of their strings, while a drum's head - a layer of skin or fabric stretched over a frame - vibrates and causes its particular sound. A guitar has considerably more sustain - the term applied to the length of time the sound-producing feature of the instrument vibrates, or, in simpler terms, how long a sound "lasts" - meaning that if you were to pluck a guitar string and strike a drum's head at the same time, you'd continue to hear the guitar's string vibrating far longer than the drum's head. Physically, they're different as well. A drum is composed of a frame - usually circular - with a tightly-stretched sheet of fabric or skin clamped or pinned in place. This sheet - called the "head" - is struck with a solid object like a drumstick or a tipper (the small stick used to play the Celtic bodhrán) to produce a percussive vibration in the head and the air surrounding it. A guitar has a set of tightly-stretched strings - modern strings are generally steel (for electric guitars), bronze (for acoustics) or nylon (for classical acoustics) - that, when plucked or struck with a plexus (also known as a "pick") vibrate and cause sound. In terms of categorization, drums are percussion instruments - defined as instruments whose sounds are elicited via striking some part of the instrument - and guitars are string instruments - defined as instruments whose sounds are elicited by virtue of vibrating strings - though astute students of musical classification will note that while the piano is categorized as a percussion instrument, it does bear some of the characteristics of stringed instruments. Guitars are more commonly found in "electric" versions than are drums, though electronic drum kits do exist. Generally, these kits' sounds are sampled from live drum kits and mapped to certain areas on their striking faces. Historically, the drum is a much more venerable instrument than the guitar as well; the modern guitar evolved from Renaissance instruments like the lute and cittern, while the drum has been played in various shapes and sizes since very nearly the dawn of civilization.