Tohsaka Rin (遠坂 凛 Tousaka Rin) is one of the three main heroines of Fate/stay night. Unlike Saber and Sakura, she is a major character in all three scenarios of F/sn.
A model student and idol of Shirou's school, Rin is secretly a sorceress and Master in the Holy Grail War. She is descended from a long line of sorcerers, and though lacking a formal magic education, is extremely powerful in her own right. Her father, Tohsaka Tokiomi, was killed in the 4th Holy Grail War, and she has trained since his death to succeed him. Her mother is Tohsaka Aoi. She is perceptive, resourceful and avidly competitive. Although she tried to summon a Saber-class Servant, she accidentally called Archer (Fate) instead.
Her role in 'Fate/zero'
Rin was brought up as the successor to her family's magecraft, and was instructed by her father to prioritize sorcery over her own interests. Ten years ago, Tokiomi was selected as a Master in the 4th Holy Grail War, and Rin was entrusted to take care of the Tohsaka estate until his return.
Her role in 'Fate/extra'
Tohsaka Rin is the Master of Lancer in Fate/Extra. She is a different person than the Tohsaka Rin that appears in Fate/stay night, but they are relatives part of the same lineage in the Fate/Extra universe. She's an activist that fights against the Harway family, so her reason to participate in the Holy Grail War is to stop Leo.
Her role in 'Fate/kaleid liner PRISMA☆ILLYA'
Tohsaka Rin is a magus sent by Kischua Zelretch Schweinorg, together with Luviagelita Edelfelt, to Japan to collect Class Cards. She differs from her Fate/stay night counterpart in that she is already affiliated with the Association's Clock Tower and Zelretch while still in high school. She is entrusted with Kaleidostick Ruby and she is extremely capable in magical girl form, but due to her competitive nature with Luvia, Ruby cancels their contract. Rin then forces Illya, to whom Ruby takes a liking, to act as her "servant" and collect the cards in her place.
She is in constant conflict with Luvia over everything, which stems from competing over their crush on Shirou, which first came about upon seeing him stubbornly attempt the high jump. Though normally competent, their fighting often causes them to create various embarrassing blunders, leaving Illya and Miyu with a negative opinion of their skills.