There are a quite a few differences between the 6 ways in which the immunity to ground is given
To be very clear grounding mechanics include moves like smack down, thousand arrows, and gravity. They remove the immunity to ground if a Pokémon has it and raising means that the immunity to ground is given, but they can still be grounded.
flying types are a type and not a move or ability. It is affected by ‘grounding’ as normal, simply erasing the immunity to ground
levitate can be affected be ‘grounding’ in the same manner as flying types and the only difference is the fact that it is an ability.
magnet rise Is a bit different to the other 2. It only lasts 5 turns, and it completely negates ‘grounding’ moves. Outside of ‘grounding’ moves it also gives an immunity to entry hazards and can be carried by baton pass to a different Pokémon (who will then not be affected by entry hazards)
Air balloon acts as levitate but as a held item. All non-ground type moves ‘ground’ the Pokémon and also remove the item with the phrase ‘[pokemon]’s air balloon popped!’
earth eater gives an immunity to ground moves (which now heal the user) and cannot be ‘grounded’ by any moves
roost simply removes the flying type from a Pokémon for a single turn. Grounding will fail against someone who has used roost as roost practically grounds the user itself!
telekinesis ‘raises’ the user for 3 turns, ‘grounding’ will occur as usual and all non-OHKO moves will hit the target no matter what.
wonder guard means that you are only immune to ground if you are not weak to it. In this way grounding moves do not ground the Pokémon as they are not considered ‘raised’ as the Pokémon with wonder guard has an immunity for every Pokémon it is not weak to.
Hope I helped! :D