First you have to place the detector rail, the 4 normal rails and the 3 powered rails. Then you place 2 blocks behind the powered rails to prevent the cart from driving off the track. After that you have to place a block left/right of the track and place a button on one side of the block which you can reach when sitting in the minecart. Then you have to dig up 2 lines left/right of your track and one underneath your track. As seen on the image, put 1 redstone dust below the detector rail, which goes to powering 1 redstone torch of the side of a block. That torch powers another torch, placed on top of a block, which will then power the rails. You may also wish to place another booster/stop point at the other end if you are making a railway. That way you can go back and forth.
How does it work?
If you drive to the minecart stopper you drive above the detector rail, which sends a redstone signal to the powered rails (the first torch is an inverter, the second torch is an upward signal). The powered rails will stay powered until you reach the end of the track, then they will shut down and stop your minecart. If you want to start again just press the button which will give a redstone signal to the powered rails so your cart gets a starter boost.
Note that the length is designed for an entry with nearly full momentum. If you drive in too slow or fast and get slowed down too early or too late try to shorten or lengthen the distance between the detector rail and the powered rails.
Also remember that you can't shorten the redstone circuit because the signal would get "cut off" if you place a block at a vertical redstone wire.