Using nuclear power to power the vessel, it's able to carry a fuel load many times beyond the longest possible missions and ranges. So, while not actually "unlimited," there isn't a plausible scenario where they'd run short. As mentioned in Nat's answer, the fuel core for Nimitz-class aircraft carriers is estimated to be at least 20 years. No mission would take 20 years, and that leaves plenty of leeway for outfitting with a replacement core if they are using up power faster than the original estimates.
USS Nimitz - wikipedia
How is it possible? Radioactivity <> explosiveness. You've probably noticed that nukes, while more widespread than we'd like, are not universal. The concept of fission and fusion are well known, so why is this? Because creating a device that is capable of creating an uncontrolled fission chain reaction is not that simple. You'd need to be able to have enough to create the reaction, but not enough that it would spontaneously happen.
Amid all the fear and confusion, one fact remains: It is notoriously difficult to build an advanced nuclear weapon.
"It's a very challenging goal," Leonard Spector, deputy director of the James Martin Center for Nonproliferation Studies, said today in a telephone interview.
... Other significant hurdles remain, related to everything from enriching the material, to building a successful detonation device, to delivering it all with a conventional missile that may not be able to carry the extra weight of a nuclear warhead.
... The tricky part
In order to sustain the type of chain reaction necessary for a bomb explosion, the atoms need to be held in a modified state known as "supercritical mass" so that more than one of the free neutrons from each split hits another atom and causes it to split. A supercritical mass is formed in a uranium bomb by initially storing the fuel as separate subcritical masses to prevent the bomb from detonating too early, and then joining the two masses together. The bomb also needs to be designed to allow enough of the chain reaction to take place before the initial energy from the explosion causes the bomb to fail.
But a major problem with uranium bombs... is the fact that the material happens to be the world's heaviest naturally occurring element.
Live Science: Why It's So Hard To Make Nuclear Weapons
Also, the main obstacle is enriching enough uranium to have it be capable of being used to trigger a thermo-nuclear explosion.
It seems like most of your concern focuses on the idea that a nuclear plant makes for a juicy explosive target that could set off a nuclear explosion. The differences between enrichment needed for power generation and weaponization make that not so.
In order to be "weaponized," uranium much be enriched to a level of Uranium 235 of 80% or more (ratio of U-235 to U-238).
Union of Concerned Scientists: Fissile Material Basics
In order to be capable of a fission reaction for power generation, that level is below 5%. So, even if I have a reactor running on 20% enriched fuel, a direct hit isn't going to trigger a massive explosion.
WorldNuclear.org: Uranium Enrichment
HOWEVER, due to space constraints and the desire to get maximum bang for the buck, the nuclear military vessels do use uranium that has been enriched to a weaponized level. The design of the power plants is such that it isn't concentrated all together to reach that supercritical mass. You have many separate fuel rods, along with slowly dissipating materials that dampen the reactions for a more even, long-term "burn" of the fuel.
On a side note, there is obviously concern about proliferation of stolen weapon grade materials with more uses in a more widespread manner. Moreso, probably, than fears about an accident or explosion from a strike.
Wikipedia: Nuclear Marine Propulsion
BlueBird Electric: USS Dwight D Eisenhower (has photo of nuclear fuel rod array)
In slamming together the sub-critical masses into a supercritical one, a conventional explosive charge is carefully crafted, designed and triggered. Being hit by a bomb or shell would not have these characteristics.
Now, there are the dangers of any normal nuclear power plant - if the reactions get too vigorous, the reactions will speed up to the point where the heat can't be controlled and the generator, itself, will melt down. There would be danger of fuel ignition if a carrier used diesel, kerosene, gasoline, coal or whale oil, though. Nuclear doesn't seem to be that much of a danger. Radioactivity is probably the main concern.
So why not use it in regular transportation? Well, the nature of a military naval vessel is that it's going to be heavily armored and protected against attack. As such, any kind of shielding or protection to prevent radioactivity from harming the crew would not be an imposition upon the design of the craft, which does not put a premium on maximum fuel efficiency.
They also have massive numbers of crews designated to running all of the ships processes and systems, including the power plants and engines, no matter what the design. Nuclear plants require constant monitoring and management.
Are we going to trust someone who doesn't know how to use the turn signal properly to monitor and manage a mini nuclear power-plant in their vehicle? The scale of the operation needed to run an aircraft carrier makes a nuclear plant not a bad option. Not true for your compact Kia.