«ما» in «مَا هَذَا؟» is a relative pronoun.
Relative Nouns — Ṣilah, ʿĀʾid, Forms and Syntax