Technically, the verb is 'quedarse' and it is a reflexive verb. We don't have reflexive verbs in English, so the construction is a bit unusual for native English speakers.
Compare the Spanish verbs 'lavar' = 'to wash' (not reflexive) and 'lavarse' = 'to wash oneself' (reflexive):
Yo lavo el coche. => I wash the car. (not reflexive)
Yo me lavo. => *I myself wash.* => I wash myself. (reflexive)
Nosotros lavamos el coche. => We wash the car. (not reflexive)
Nosotros nos lavamos. => *We ourselves wash.* => We wash ourselves. (reflexive)
(Etc. Sonia has already given a full conjugation of quedarse above.)
The words me, te, se, nos, os, se are called reflexive pronouns, and are sort of like the English words myself, yourself, him/herself, ourselves, etc.
Not all verbs that are reflexive in Spanish are treated that way in English.
So in English we would say 'I stay' and not 'I stay myself', even though it is yourself that is staying.
So to say "We stay" in Spanish, you would say "Nosotros nos quedamos" [Literally, we ourselves stay], or more simply just "Nos quedamos"
HTH