The building code sorts the ways that buildings are used into separate "occupancy classifications". Every building is given an occupancy classification when it is built, and each occupancy classification has different building code requirements that go along with it. The requirements reflect the type of hazard or uses in the building.
For building code purposes, changing a house to a child care, preschool or school is a "change of occupancy" from an R3 residential occupancy to an E educational occupancy. When the occupancy of a building changes, that triggers some building code requirements as if it were new construction; aspects of the building that would have been grandfathered under the original permitted use need to be addressed in the light of current code.
Only rooms at grade level, each with an exit door directly to the outside, can be used as classrooms or for day care. Basements and second stories can't be used by the children, unless the entire building is sprinklered.