Mechanism
Nuclear thermal propulsion (NTP), relying on the heat produced by atomic fission, offers high thrust and efficiency making it a strong candidate for a mission to Mars. These engines have three main components: a nuclear reactor core, fuel elements, propellant channels, and a nozzle. The most common propellant used would be liquid hydrogen because it has high energy content and is lightweight. The liquid hydrogen can behave as both a propellant and a cooling agent to ensure the reactor maintains safe temperatures.
Safety Precaution
The nuclear waste produce by uranium remains in the reactor, meaning that no nuclear toxins are expelled into atmosphere or space. Additionally, the booster phase, the period launching the spacecraft out of Earth's atmosphere, would be powered by chemical propulsion system. Only later phases, well out of the Earth's atmosphere, are powered by nuclear reactors.
Advantages
Even though chemical propulsion rockets can produce higher thrust, NTP is twice as efficient as conventional propulsion. Back in the 60s, the Nuclear Engine for Rocket Vehicle Application (NERVA) successfully designed an engine with specific impulses of up to 900s seconds. Considering that Mars, at closest distance from Earth, is 200 times the distance between the Moon and the Earth, chemical propulsion would be not nearly efficient enough for such ambitious missions. Incorporating a NTP system would cut the duration of the mission in half, making it more realistic for us to step foot on Mars in the 2030s
Here is a short video on the hot fire done with nuclear thermal propulsion during the space race