Overview
In Modern English, we is a plural, first-person pronoun.
Morphology
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.
History
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:
From Wikipedia (CC BY-SA 4.0).