Sofia Lamb is the main antagonist in BioShock 2, taking over Andrew Ryan's role as leader of Rapture.
Lamb, a doctor and psychologist, was recruited by Ryan to serve in Rapture. An offer she accepted. However, her altruistic, utopian ideals soon came to clash with Ryan's and she effectively began to build up her own power base in her commune in Dionysus Park, eventually forming a cult-like religion called The Rapture Family.
With conflict between the two opposing ideals and power bases becoming more and more inevitable, Ryan hired Sinclair Solutions to spy on Lamb's 'family', which ultimately led to her arrest.
Imprisoned in Persephone, Lamb's talents were put to use treating other inmates. However, Lamb used this freedom to turn her fellow inmates to her cause. Eventually, Lamb led a successful uprising within the prison that coincided with Rapture's civil war.
With Ryan's attention focussed on Atlas' uprising, Lamb's power base was able to grow almost entirely unhindered, promising to rebuilod the city once the fighting was over. At the same time she experimented with Plasmids and Tonics on her willing suppporters.
After the protoganist in the original BioShock kills Andrew Ryan, Lamb is able to move much more freely around Rapture and her support continued to grow. Eventually she gains total control over Rapture and rules with an iron fist.
Lamb then began her attempts to create an intellect that would be completely selfless and good. Lamb realized that the only person who could contain all the ADAM of Rapture was someone who had previously been a Little Sister, Eleanor Lamb.
Delta, in his mission to rescue his 'daughter', Eleanor, comes into direct conflict with Sofia, who sends her forces to kill him, including the Big Sisters. Eventually she manages to trap Delta, but doesn't kill him so that he is unable to ressurrect at a Vita-Chamber, which allows Eleanor to eventually free him.
This causes Lamb to spiral into depression, realising that all of her plans have come to nothing because of the strength of Eleanor's bond to her Bid Daddy. She decides to destroy Rapture, detonating explosive charges.
At the end of the game whether or not Sofia Lamb dies is determined by Delta's actions over the course of the game. If Delta rescues the Little Sisters and spares the three NPC moral choices, then Eleanor will be influenced to forgive her mother and save her from drowning. However, if Delta chose to kill some or all of the NPC characters and harvests the Little Sisters, then Sofia will drown at the hands of Eleanor before reaching the surface.