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.
check http://www.minecraftwiki.net/wiki/Detector_Rail for details