How do I protect a 3v DC circuit from being damaged, if someone accidentally plugs in a 12v power supply? The circuit will draw much less than 1 amp.
One thing not specified by the original question is if they are looking for protection of I/O signals or power supply connections.
If the protections are needed for I/O signals then the suggested zener diode circuits or other methods including TVS (transient voltage surpressor), clamping diodes are the useful ways toward protection.
When protecting at the power supply connections there are a number of schemes that can be utilized. The previously mentioned poly fuse or other type that is designed to trip at a voltage overload are workable but often have a kick-in delay time where the circuit is momentarily exposed to the high voltage condition.
My suggested approach is to use a design that uses a wide voltage range input regulator circuit and a polarity protection diode. This gives very reasonable "protection" for voltages that a user is likely to mistakenly apply to the power supply input. Here is a block diagram of the suggested approach.
This approach also becomes the power supply for the device itself. For devices that operate at low power this approach can utilize simple linear regulators such as the 78xx series. These will protect for input voltages of up to 35 volts or so. Higher power devices will want to utilize a wide supply voltage range switcher type regulator. There are various devices voltages from vendors such as TI and National (now actually part of TI) that can support input voltages up to 60V and in some cases even 80V.
What you need is a crowbar circuit to protect your circuit from overvoltage. This is one of a standard methods used in power supplies and devices as a protection for over voltage.
A simple crowbar circuit is depicted below.
Circuit above will protect your circuit/device at Vo by blowing the fuse in case of an over-voltage condition. Keep in mind that this is a generic circuit describing the protection method.
If you are willing to have a fuse blow, then a clamp circuit would work. The point is not to try to regulate the input voltage down to 3 V, but to deliberately blow the fuse, thereby disconnecting the input power, if that power exceeds some threshold. The fuse could be a polyfuse that then resets itself after power is removed, but that will add some series resistance to the supply even in normal operation. Whether that is acceptable depends on parameters you haven't told us.
You therefore want a circuit that ideally acts open until the voltage accross it reaches something like 3.5 V, then acts like a short. In theory a zener diode does this, but it won't have the current capability to blow the fuse. You can use a zener to turn on a transistor, which then does the heavy lifting. Or, you can use something like a TL431 as a voltage reference to turn on a transistor.
A totally different approach is to have a active switch in series with the power supply. A circuit would only enable the switch when the input is below the threshold, and disconnect when it is above. It won't be able to react instantly, so your circuit has to be able to tolerate probably at least a few µs of overvoltage. A L-C filter can limit the slope of input voltage, but this is starting to get overly complicated.
Well really you need a crowbar. This cct basically shorts (nearly) the power supply and hopefully signals the issue i.e. blows a fuse or engages a current limited supply to, well, current limit. The Wiki link has the principles, axotron has some solutions (which are generic and good).
Thing you are looking for is "Over voltage protection Circuit".
One way is to use a Zener Diode in reverse bias.
Zener diode will always give you a constant output voltage irrespective of input voltage (But Check Datasheet for Vmax)