Well you can take your battery, step the voltage down so that 0-5v is scaled to the battery and feed that into one of the arduino's analog input pins.
You can use a handful of parts, zener, resistor, transistor to switch a digital pin high or low based on what an external voltage is but I've not done it yet.
Something like this but the transistor collector would be connected to a digital pin that's being pulled high by a 10k resistor to +5v. The rest I'd have to sit down and figure out how to drive the transistor as I don't think what is there will work right.
http://www.reconnsworld.com/power_12vbattmon.html