If you haven't seen a video of a railgun in action, check out: this one at military.com. (Note, browsers with tracker blockers will have to accept the Brightcove tracker in order to view the video.)
The Navy is hoping it can serve to defend against Cruise missiles and possibly ballistic missiles. But it takes a lot of energy to power it, so for Navy usage a ship's engine will power a bank of capacitors which will create the 32 megajoules that would accelerate the projectile down the barrel toward a target up to100 nautical miles away.
Presumably they've got the computer power to calculate the trajectory and drop over that distance, because it's point and shoot without an on board guidance system.
I wonder how long it will be before some tinkerers get one to work from the power generated by a 12 volt car battery. Although a home defense system that could punch a hole through every house on the block might be a little excessive.