This line is spoken by Marcellus in the first scene of the play. He is commenting on the fact that the ghost of King Hamlet has disappeared after the men threatened to strike at it with their clubs and swords.
We do it wrong, being so majestical,
To offer it the show of violence;
For it is, as the air, invulnerable,
And our vain blows malicious mockery.
The line in question specifically means that the ghost is incorporeal, that it is not made of flesh and blood. So Marcellus means to say that the guards have done wrong in thinking of striking the ghost. First, it is majestic, assuming the form of the recently-deceased king; and second, it can't be injured by their weapons in any case.