DC Comics' Cyborg, otherwise known as Victor Stone, was first introduced in 1980 as a member of the Teen Titans; it wasn't until 2011 that he would become a founding member of the Justice League during a DC Universe-wide continuity reboot dubbed The New 52. Thus, he has two origins in the comics, one pre-New 52 and one post-New 52, but neither were directly adapted into his DC Extended Universe origin.
In the comics, Victor's original origin presented him as a regular test subject for his parents, Silas and Elinore Stone, who would force him into being the lab rat for their various experiments and treatments. When his parents, who are scientists at S.T.A.R. Labs, accidentally unleash a vicious being in their dimension when performing one of their many experiments, Victor is severely hurt and Elinore is tragically killed. Victor's injuries are so sever, he's only able to survive by being turned into a literal Cyborg.
In the post-New 52 comics, Victor is a high school football star who was sought after by many college scouts, though his father Silas never seemed to care. After a huge football victory, Victor heads to S.T.A.R. Labs where scientists are working on a Mother Box that Superman came across during a battle with a Parademon. After arguing with his father, Victor is hit by the impact of the Mother Box's explosion, destroying most of his body and killing a number of scientists. Silas works quick to save his son's life, injecting his son with nanites and bonding his body with a Promethean skin graft, Doctor William Magnus' responsometer, and other strange pieces of technology. The energy from the Mother Box is incorporated into Victor's new body, breathing life into him and allowing him to function with all of the technology he's been infused with.
In the DC Extended Universe, Victor Stone's origin isn't all too different from his most recent comic book origin, though the source of his powers has changed. Actor Ray Fisher's Vic is a former star athlete at Gotham City University who gets in a tragic car accident that leaves his life in serious danger. That is until his father, Silas, saves him. A scientist at S.T.A.R. Labs, Silas is used to using all types of technology for his numerous experiments, and he just so happens to have a Mother Box in his lab. Thinking on his feet, Silas uses one of the three Apokoliptian Mother Boxes to reconstruct Victor's body, turning his son into half-machine and half-man - oh, and subsequently a superhero.
This change more or less presented in the character's cameo in 2016's Batman v Superman: Dawn of Justice, and it's reaffirmed by Victor himself in Justice League. The Mother Box used by Silas to save Victor's life is one of three on Earth, with the other two in the possession of the Amazonians and the Atlantians. The Mother Box used to revive Victor was buried deep underground with great secrecy, but was found over time and found its way to S.T.A.R. Labs for extensive research.
Steppenwolf invades Earth, yet again, in an attempt to retrieve the Apokoliptian supercomputers to destroy Earth - which would be just yet another planet he's conquered - but Cyborg is able to use his newly-found abilities to tap into the Mother Boxes. He's then able to manipulate and understand them because he harnesses their power, ultimately stopping them from converging and saving the planet.
Now in theaters, Justice League stars Ben Affleck as Batman, Henry Cavill as Superman, Amy Adams as Lois Lane, Gal Gadot as Wonder Woman, Jason Momoa as Aquaman, Ezra Miller as The Flash, Raymond Fisher as Cyborg, Willem Dafoe as Vulko, Jeremy Irons as Alfred Pennyworth, Diane Lane as Martha Kent, Connie Nielsen as Queen Hippolyta, Amber Heard as Mera and J.K. Simmons as Commissioner Gordon.