Detector Rail

Detector Rails are blocks that were added in Beta Version 1.5. They act like pressure plates but are a type of rail, allowing minecarts to move over them.

When any kind of minecart is on top of the Detector Rail, it will generate a redstone signal. The signal will be transmitted to blocks that are adjacent to the detector (including Powered Rail) and redstone placed under the rail, meaning it behaves exactly like a pressure plate.

Crafting
Detector rails are crafted as normal rails, but with a pressure plate instead of sticks, and the addition of redstone.

Uses
Detector rails can be used for many things. One train station-like feature could be activating a note block to indicate that a minecart is approaching.

Detector rails can be used with a memory cell to power powered rails for long tracks.

Additionally, they can be used to create a one-way gate to a Powered Rail, with any carts coming the other way slowing down if not stopping completely.

A Trap bases on the land mine trap can be built with powered rails as a stand in for a regular pressure plate, then placing it in a rail system to kill the occupants of mine carts. If water is beneath the TNT the explosion usually won't destroy the pressure detector rail and can't destroy the mine cart. Because the mine cart absorbers the blast, a detector rail trap won't usually be lethal to anyone outside the cart or a few blocks away. There is a chance that the mine cart will bump the TNT and prevent it from falling straight down and not touch the water and therefore destroy blocks when it explodes. It is also possible for a very fast moving mine-cart to skip over the pit the TNT makes as it falls, thereby evading danger.

Trivia

 * When the detector rail was first added to the game it could not be placed next to any rail without the game crashing due to a bug.
 * Theres a glitch, where the detector rail powers up on its own, without having a minecart on it: http://www.youtube.com/watch?v=tj22xv28uL4