Mostly by designing this equipment to be radiation tolerant in the first place, and also providing redundancies where needed. The materials and components selection are are a careful process, with previous spaceflight heritage being an important design driver. Electronics, joints, bearings, lubricants - all of these need special attention.
Radiation is most immediately harmful to electronics and electronics is a mix of very expensive "radiation hardened by design" or RHBD components, and carefully picked COTS components in things like motor driver circuits, that fit the temperature and fault tolerance criteria. But long term, radiation affects other components, too, although the effects on martian surface are somewhat more benign than in deep space.
More than radiation, parts of the rovers also need careful thermal management, to keep the components in their required operating temperature range. Hence some of the key electronics parts are placed in whats commonly called a warm electronics box.
In extreme environments like Jupiter's magnetosphere, spacecraft may need extra layer of radiation protection like Juno's radiation vault, which is effectively a heavy titanium box that contains most mission-critical electronics elements.