How does the $ work?

How do you store data using $? and how do you use it later, in for example give command?

Continue to help post