One of the uses of the apostrophe is to show possession, which means who something belongs to.
the girl's room = the room belonging to the girl
If the room belongs to more than one girl, then the apostrophe comes after the 's'.
the girls' room = the room belonging to the girls
The word girl is a singular noun but the word girls is a plural noun (plural means 'more than one').
Most plural nouns in English end in 's' so the apostrophe comes after the 's'.
the boy's ball = the ball belonging to one boy
the boys' ball = the ball belonging to more than one boy