The teacher wants to divide each of the 18 slices of pizza into sevenths.
For mental imagery sake, think of it as her wanting to split each piece into seven. So instead of the original 18 slices, it would be 7 slices from one of the original 18 slices, plus 7 slices from another original slice, plus 7+7+7+ 7+7+7+7+7+7+7+7+7+ 7+7+7+7.
It's much easier though to divide 18 by 1/7:
She will be able to give 126 students slices of pizza.