In Modern English, we is a plural, first-person pronoun.
In Standard Modern English, we has six distinct shapes for five word forms:
we: the nominative (subjective) form
us and : the accusative (objective; also called the 'oblique'.) form
our: the dependent genitive (possessive) form
ours: the independent genitive (possessive) form
ourselves: the reflexive form
There is also a distinct determiner we as in we humans aren't perfect, which some people consider to be just an extended use of the pronoun.
We has been part of English since Old English, having come from Proto-Germanic *wejes, from PIE *we-. Similarly, us was used in Old English as the accusative and dative plural of we, from PIE *nes-. The following table shows the old English first-person plural and dual pronouns:
By late Middle English the dual form was lost and the dative and accusative had merged. The ours genitive can be seen as early as the 12th century. Ourselves replaced original construction we selfe, us selfum in the 15th century, so that, by century's end, the Middle English forms of we had solidified into those we use today.
We is not generally seen as participating in the system of gender. In Old English, it certainly didn't. Only third-person pronouns had distinct masculine, feminine, and neutre gender forms. But by the 17th century, that old gender system, which also marked gender on common nouns and adjectives, had disappeared, leaving only pronoun marking. At the same time, a new relative pronoun system was developing that eventually split between personal relative who and impersonal relative which. This is seen as a new personal / non-personal (or impersonal) gender system. As a result,
We can appear as a subject, object, determiner or predicative complement. The reflexive form also appears as an adjunct.
Subject: We're there; us being there; our being there; we planned for ourselves to be there.
Object: They saw us; She pointed them to us; We though about ourselves.
Predicative complement: They have become us; We eventually felt we had become ourselves.