Piper Chapman of Orange is the New Black is based on Piper Kerman, who wrote the memoir Orange is the New Black: My Year in a Women's Prison.

As a younger woman, she falls in love with Alex Vause and gets involved in drug trafficking.

Years later, when she's happily engaged to Larry Smith, her crimes catch up with her and she is sent to prison.

When she first enters prison, she plans on staying faithful to her fiancé, but as the reality of prison starts to sink in, Piper begins to change. In prison, she has relationships with Alex (again) and Stella. At the end of season 6, Piper Chapman and Alex Vause are married.

Oddly the show never actually describes Piper Chapman as bi, even though Piper Kerman has been very open about her bisexuality.