There is nothing in 'scuba gear' (i.e. the equipment used for scuba diving) which inherently prevents decompression sickness (DCS, 'the bends'). Wikipedia has some very good (i.e. reliable) information about scuba diving and DCS. Here are the basics (key phrases in inverted commas).
Ambient pressure increases proportional to depth -- for every 10 msw (~33 fsw) of depth, a diver experiences a pressure increase of 1 atmosphere (ATA), in addition to the 1 ATA of surface pressure. Scuba divers must breathe gas at ambient pressure in order to be able to inflate their lungs. So at 10 msw (~33 fsw), the diver must breathe gas at 2 ATA, at 30 msw (~100 fsw) he breathes gas at 4 ATA, etc.
All living organisms require oxygen (O2) for metabolism. However, at O2 'partial pressures' (pO2) higher than normal (pO2 > 0.21 ATA), O2 becomes increasingly poisonous ('O2 toxicity'). A pO2 > 0.5 ATA over long durations results in chronic (pulmonary) toxicity. At pO2 > 1.6, acute (neurological) toxicity symptoms (including epileptic-like seizures) may occur without warning. Divers use a routine limit of pO2 = 1.4 ATA, and an emergency limit of pO2 = 1.6 ATA ('NOAA oxygen limits').
Pure O2 has a 'max. operating depth' (MOD) of ~6 msw (20 fsw), so for exploration at greater depths, an 'inert gas' is needed to dilute the O2 in the breathing mixture. Normal air (~78% nitrogen [N2] and 21% O2) is an already-diluted O2 source. Solely from the point of view of O2 toxicity, normal air has a routine MOD of ~55 msw, and an emergency MOD of ~66 msw. (In practice, the high pN2 of air becomes increasingly anaesthetic at these depths, so deep 'technical divers' generally use 'trimix' instead, a breathing gas in which some of the O2 and N2 is replaced by helium [He]).
The human body is ~70% water, and these fluids are saturated with N2 at surface pressure ('Charles' Law'). During a scuba dive, the increased pressure of the breathing gas at depth generates a pressure gradient between the lungs and the blood / tissue fluids, which will force additional inert gas into solution in the body tissues, tending towards 'saturation' at the increased pressure. How much inert gas dissolves will depend on both the depth (higher pressure = faster dissolution), and the time spent under water (more time = more gas absorption). So long as the diver remains at depth, this dissolved inert gas will stay in solution.
However, when the diver begins their ascent, the inert gas pressure in their lungs will drop, which reverses the direction of the inert gas pressure gradient -- there will now be a higher inert gas pressure in the tissues than in the lungs ('supersaturation'). This will cause inert gas to diffuse from the tissues into the blood, and thence be transported to the lungs, where it can be exhaled.
DCS occurs primarily when the pressure gradient becomes too steep for the dissolved inert gas to remain in solution prior to elimination, because the diver has ascended too rapidly, and/or missed mandatory 'decompression stops'. Instead of being eliminated via the circulation and the lungs, the inert gas comes out of solution and forms bubbles while still in the body tissues. These bubbles can form anywhere in the body, so DCS can present a wide variety of symptoms, from minor (e.g. aching joints, painful muscles, skin rashes) to major (e.g. vertigo, visual disturbances, numbness/paralysis, shock, unconsciousness or death).
The absorption / elimination of pressurised inert gas can be modelled mathematically, and these models used to predict safe 'dive profiles'. The first such model was produced in the early 20th century by the biologist J.B.S. Haldane -- modern models are far more sophisticated. The output of such models can be presented in static (dive tables of depths vs. time) or dynamic form (a unique profile generated by a 'dive computer' using its programmed decompression algorithm and actual dive parameters). Staying (well) within the limits of the chosen dive profile is the best way for a diver to MINIMISE the risk of suffering DCS.
The only treatment for DCS is recompression in a hyperbaric chamber, which forces the inert-gas bubbles back into solution, followed by a slow decompression to eliminate that inert gas in a (more) controlled manner. Serious DCS cases, and/or cases where the diver has failed to get prompt treatment, may require multiple rounds of recompression therapy, over multiple days.