Place Detectors adjacent or underneath Tracks and they will emit a Redstone signal if certain conditions are met (see below). A redstone signal will only output on the side with the Red dot. You can use the Crowbar or other Wrench to rotate Detectors.

Player Detector

Stone Slab Stone Slab Stone Slab Crafting Arrow Player Detector
Stone Slab Stone Pressure Plate Stone Slab
Stone Slab Stone Slab Stone Slab

Place Adjacent to the track. Will emit a Redstone signal if this block detects Minecarts with Players in them.

Empty Detector

Stone Bricks Stone Bricks Stone Bricks Crafting Arrow Empty Cart Detector
Stone Bricks Stone Pressure Plate Stone Bricks
Stone Bricks Stone Bricks Stone Bricks

Will emit a Redstone signal if this block detects Minecarts that are rideable but are empty.

Item Detector

Wooden Planks Wooden Planks Wooden Planks Crafting Arrow Item Detector
Wooden Planks Stone Pressure Plate Wooden Planks
Wooden Planks Wooden Planks Wooden Planks

This Detector will search Chest Carts for items. You can specify what items to check for and it will emit a Redstone signal when that criteria is met. (Will specifying no items detect all Chest Carts or just ones that are empty?)

Tank Detector

Brick Brick Brick Crafting Arrow Tank Detector
Brick Stone Pressure Plate Brick
Brick Brick Brick

Will check for Minecarts that can hold liquids. Will emit a Redstone signal if your criteria is met. You can specify the type of liquid and the amount to check for.

Animal Detector

Oak Wood Oak Wood Oak Wood Crafting Arrow Animal Detector
Oak Wood Stone Pressure Plate Oak Wood
Oak Wood Oak Wood Oak Wood

Right-click to open a User Interface where you can specify what kind of animal to check for. When this block detects a Minecart that contains the animal that you specified, it will emit a Redstone signal.

Advanced Detector

Iron Ingot Iron Ingot Iron Ingot Crafting Arrow Advanced Detector
Iron Ingot Stone Pressure Plate Iron Ingot
Iron Ingot Iron Ingot Iron Ingot

Right-click this Detector to open an inventory, where you can place different types of Minecarts to look for. This Detector will emit a redstone signal when it detects the carts that you specified.