Quedar and quedarse have tons of meanings, but one of its most important is as a verb of change. In English you have "become" that is used in most situations. In Spanish there are many such as ponerse, hacerse, volverse, convertirse en, and quedarse. They are all used in different situations and under different but sometimes overlapping situations. For example, you only use "convertirse en" with nouns.
Quedarse is used with adjectives and participles. Quedarse generally expresses change in the state of something.
You have to learn through exposure for the most part when an adjective is ideal for quedarse, but it is frequently used with physical defects like deafness and blindness and also civil states as in being widowed or becoming single and pregnancy.
Quedarse + adjetivo:
Se quedó ciego. = He went blind.
Se quedó sordo. = He went deaf.
Se quedó viuda. = She became a widow or She was widowed.
Se quedó soltero = He became single.
Se quedó embarazada. = She became/got pregnant.
Quedarse + participio:
Los niños se quedaron maravillados al ver los juegos de magia. = The children were amazed upon seeing the magic tricks.
Se quedó sorprendido. = He was surprised.
Se quedó pensando. = He was left thinking. or He was in thought.
Quedar can be used, but typically quedarse is used.There are many other uses of quedar as well and there are set phrases, as in the one J. Ríos pointed out. "Quedarse sin" means to run out of.