Marshtomp is water-ground, and since starly is normal flying, ground “matches” up with flying, making starly immune to marshtomps attacks
whereas, tailow is just flying, so water matches up with flying, making tailow take normal damage from marshtomp
1. Rather than what type of move you are using, the effectiveness is solely considering the type of pokemon. [ Move Type is only considered in calculation of STAB - Same Type Attack Bonus]
Eg:Pokemon battle example
Pokemon A - Type 1 - Normal , Type 2 - Flying
Pokemon B - Type 1 - Ground , Type 2 - Electric
The main point to be noted is in the below illustration :
2. While using AOE- Area Of Effect Moves [Rockslide, Powered Snow, Earthquake etc..] The first wild pokemon you target is considered to see if they are type immune or not.
Here out of 3 pokemon, 2 are normal/flying. and our pokemon (User pokemon) os Normal/Ground. Ground matches up with flying and it will not do damage; Normally. BUT
The User pokemon targets a Bug/rock type pokemon using AOE - As area of Effect damages an all pokemon in a area, The other two immune pokemon also gets damage.
Furthermore, The damage of AOE is calculated depending on the first target. there fore, even if the second and third pokemon are lvl 100, and the first target is just level 5 - The Huge damage from our pokemon (level 50) Wil be considered for the level 100s in that area too.