What is the difference between resistance and impedance?
Resistance is a concept used for DC (direct currents) whereas impedance is the AC (alternating current) equivalent.
Resistance is due to electrons in a conductor colliding with the ionic lattice of the conductor meaning that electrical energy is converted into heat. Different materials have different resistivities (a property defining how resistive a material of given dimensions will be).
However, when considering AC you must remember that it oscillates as a sine wave so the sign is always changing. This means that other effects need to be considered - namely inductance and capacitance.
Inductance is most obvious in coiled wire. When a current flows through a wire a circular magnetic field is created around it. If you coil the wire into a solenoid the fields around the wire sum up and you get a magnetic field similar to that of a bar magnet on the outside but you get a uniform magnetic field on the inside. With AC since the sign is always changing the direction of the field in the wires is always changing - so the magnetic field of the solenoid is also changing all the time. Now when field lines cut across a conductor an emf is generated in such a way to reduce the effects that created it (this is a combination of Lenz's and Faraday's laws which state mathematically that E=N*d(thi)/dt , where thi is the magnetic flux linkage). This means that when an AC current flows through a conductor a small back emf or back current is induced reducing the overall current.
Capacitance is a property best illustrated by two metal plates separated by an insulator (which we call a capacitor). When current flows electrons build up on the negative plate. An electric field propagates and repels electrons on the opposite plate making it positively charged. Due to the build up of electrons on the negative plate incoming electrons are also repelled so the total current eventually falls to zero in an exponential decay. The capacitance is defined as the charge stored/displaced across a capacitor divided by the potential difference across it and can also be calculated by the size of the plates and the primitivity of the insulator.
So simply resistance and impedance have different fundamental origins even though the calculation for their value is the same:
Martin Archer, Physics Student, Imperial College London, UK
Impedance is a more general term for resistance that also includes reactance.
In other words, resistance is the opposition to a steady electric current. Pure resistance does not change with frequency, and typically the only time only resistance is considered is with DC (direct current -- not changing) electricity.
Reactance, however, is a measure of the type of opposition to AC electricity due to capacitance or inductance. This opposition varies with frequency. For example, a capacitor only allows DC current to flow for a short while until it is charged; at that point, current will stop flowing and it will look like an open. However, if a very high frequency is put across that capacitor (a signal that has a voltage which is changing very quickly back and forth), the capacitor will look like a short circuit. The capacitor has a reactance which is inversely proportional to frequency. An inductor has a reactance which is directly proportional to frequency -- DC flows through easily while high-frequency AC is stopped.
Impedance is the total contribution of both -- resistance and reactance. This is important for AC analysis and design. At DC, reactive elements can be replaced with their steady-state model (capacitor->open,inductor->short) and resistance can be considered. (this isn't true for transient analysis)
It is important to mention that while energy goes into both, it is only 'burned off' through resistance. Power has to be given in terms of resistive power and reactive power. Resistive power actually burns off energy into heat while reactive power simply stores energy in E-fields and B-fields.
Often you'll hear about the 'impedance' of transmission lines, like the cables which run between components of your stereo system, and impedance of things like speakers. You'll also hear that it is important to match these or else you'll get reflection.
This is a much more complicated subject, which a few answers have commented on in recent questions about light and its speed.
However, what I want to mention is that when you hear about the impedance of a transmission line, like speaker cable or an antenna or coaxial cable or anything else, this does not represent energy which is "burned off" in the cable. This has to do with how energy is stored in the cable as it propagates down it. The cable does not (well, in reality it does, but assume the lossless case for simplicity) get hotter as a signal travels down it. It is not proper to think of a '75-ohm cable' as a 75-ohm 'resistor.' That 75-ohms is purely reactance (ideally, though there really is attenuation in real cables).
Note that impedance and reactance are both given in units of 'ohms' just like resistance. Capacitance is measured in Farads and inductance in Henries, and these relate to impedance, but they are not measures of impedance. As I said, the impedance of a capacitor is inversely proportional to its capacitance and the impedance of an inductor directly proportional to its inductance.
This may sound a little abstract. Impedance really is an abstraction of things that are far more complicated (things like time constants and rise times) that electrical engineers have to constantly consider. The idea of 'impedance' allows for many of these things to be wrapped up into one subject so that they are easier to communicate.
The short answer is -- impedance includes reactance, and reactance includes effects which vary with frequency due to inductance and capacitance.
Ted Pavlic, Electrical Engineering Undergrad Student, Ohio St.