Bob gave a very clear and detailed explanation:
1) such words behave MORPHOLOGICALLY as adjectives
(i.e. they decline and have genders and number just like adjectives),
2) however, they function SYNTACTICALLY as nouns
(i.e. they can be the subject of the sentence, or the object/complement of the verb, just like nouns).
Why so?
There is a process, both in English and in Russian, when adjectives become nouns/substantives, because they lose their initial DESCRIBING function and develop a NAMING function:
Спальная комната (describing a room) ---> спальная (naming a room),
Рабочий класс (describing a social stratum) ---> рабочий (naming a person).
This process is called "substantivization of adjectives" - субстантивация прилагательных, т.е. Развитие прилагательными предметного значения и переход их в категорию существительных:
-- These substantivized adjectives NO LONGER DESCRIBE something,
they NAME something like nouns!
-- These substantivized adjectives NO LONGER answer the question "какой? Какая? Какое?",
but they answer the question: "ЧТО? КТО?"
English also has substantivized adjectives:
-- Daniel Boone met a bunch of THE Indian BRAVES (from the adjective "brave"),
-- THE FRENCH (THE RUSIANS, THE CHINESE) will have their elections next Sunday.
-- THE RICH and THE POOR,
-- THE WHITES and THE SAVAGES...
I hope it helps. Blessings to you in mastering Russian!