In a mixture, all the constituents are mixed randomly and not in a definite proportion.They are not Chemically bonded.In air also, all the gases are not chemically bonded and are not in a fixed ratio.They vary from place to place(although very minutely).All the gases in it can be separated.All the gases reatin their own properties. These all are the properties of mixture.
In a compound, The constituents are in a fixed proportion and chemically bonded.In water, you will always get Hydrogen and oxygen in a ratio of 1:8(By mass).We can't separate hydrogen and oxygen physically. Also,it does not retain the properties of its consttuents.Therefore, its a compound.
Hence, air is a mixture and water a compound.