1. The 'o-' prefix, indicating a respectful tone.
2. 'nee', meaning 'sister'.
3. The '-sama' suffix, an honorific denoting extreme respect as might be used when addressing noble figures or gods.
Onee-sama is an unusual, overly formal way of referring to one's sister. For most everyday purposes, the neutrally formal 'onee-san' or familiar 'onee-chan' would suffice: only those raised in highly formal settings would even contemplate using 'onee-sama' in a non-sarcastic way (as one might say in English 'oh of course your highness').
'Onee-sama' is a term mostly popularised by manga and anime, specifically shoujo-ai (love between young girls) series set in high-class boarding schools (see Strawberry Panic for a textbook example). Because of this association, 'onee-sama' is inextricably tied to the more elegant side of the shoujo-ai genre: a young girl using the term to address an older, unrelated girl could be hinting at a deeper relationship between the two of them. Or they could just be messing with you.
Shoujo-ai fantasy: "Onee-sama, would you please become my soeur?"