Valorum's answer used to be perfectly correct and clear -- and it still is (for the most part) after the airing of the Season 2 Finale, where we get this nice little title card:
The timeline given by Valorum's answer (which is of course directly quoting the show) can only be maintained, if the "24 years ago" bit is narrated by Kara from the temporal perspective that is actually shown at that moment, meaning that she was stuck in the Phantom Zone for 24 years as a 13 year old (imagine her reading a diary entry from back then to us before she starts going on about her job at the then shown (and then "now") of fall 2015).
Since the show ran for two full seasons after the first episode quote, Kara has now been on Earth for 11 years and is 24/25, but at the time she became Supergirl she had been on Earth 2 fewer years, meaning she would have been on Earth before becoming Supergirl for 9 years.
In essence, the whole timeline is probably yet another example of (!! Warning! TVTropes Link !!) Writers Cannot Do Math - or retconning themselves for no apparent reason.
Edit: The episode Midvale (3x06) shows Kara (and Alex) still in High School, but clearly older than we have seen in the past. Jeremiah is already gone and Alex resentful of Kara being there at all. The episode also includes this:
So if Krpyton's destruction was 35 years before, and Kara and Alex were both clearly still teenagers 10 years before Season 3, she must have been in the Phantom Zone longer than a decade.
She states in the Pilot (1x01) that her
cousin was here two dozen years before me.
In 2x01 Winn fanboys over Superman being
12 years older than Kara, right?
All of that makes sense if and only if Kara was in fact stuck in the Phantom Zone for 24 years as a 13 year old.
That would make 23/24 when coming out as Supergirl, and 26/27 at the time of Midvale (and 16/17 in the Flashback, although probably at the younger end of the scale since Alex is older [biologically if not chronologically] and still in high school too).