How does the oauth2 token is codified, based on which info?

I mean, based on which consumer’s information is the oauth2 token generated? what does it store? How can I use it to prove that that’s a certain username trying to log in somewhere? TIA