I would like to know the meaning of "it" grammatically.
It’s as if I were walking on air.
"It" is a pronoun.
A pronoun is a word that can function by itself as a noun phrase and that refers either to the participants in the discourse (e.g., I, you) or to someone or something mentioned elsewhere in the discourse (e.g., she, it, this).
In your example, "it's" is a contraction (a shortened form of a word or group of words, with the missing letters usually marked by an apostrophe). Here, "it's" is a contraction of "it is." It is as if I were walking on air.