ظَرْفُ مَكَانٍ is a noun that identifies the place or position connected with an action.
Ask where?
جَلَسَ الطَّالِبُ أَمَامَ الْمُعَلِّمِ
The student sat in front of the teacher.
- Action: جَلَسَ — sat.
- Where did he sit? أَمَامَ الْمُعَلِّمِ.
- Therefore أَمَامَ functions as the adverb of place.