The Fantastic Four gained their superpowers through an event known as the "Cosmic Ray Incident." In the original story, which first appeared in Fantastic Four #1 in 1961, the team consists of four individuals: Reed Richards (Mr. Fantastic), Susan Storm (Invisible Woman), Johnny Storm (Human Torch), and Ben Grimm (The Thing).
The group embarked on a scientific space mission aboard an experimental spacecraft designed by Reed Richards. During their journey, they encountered a massive cosmic storm of cosmic rays. The radiation from the storm affected each team member differently, granting them unique powers.
Reed Richards was endowed with the ability to stretch and contort his body, becoming Mr. Fantastic. Susan Storm gained the power of invisibility and later developed the ability to create force fields, adopting the name Invisible Woman. Johnny Storm became the Human Torch, able to ignite his body into flames and fly. Lastly, Ben Grimm was transformed into a rock-like, super-strong being known as The Thing.
The Cosmic Ray Incident and its subsequent radiation exposure gifted the Fantastic Four with their extraordinary abilities, leading them to use their powers for good and become one of Marvel's most iconic superhero teams.