A foil balloon is made of a special type of film that limits how quickly helium atoms or air molecules escape from the balloon. How quickly air or helium escapes from the balloon is determined by how permeable the film is.
Helium atoms are smaller than air molecules. So if you use a powerful microscope to look at a foil balloon, you would see small holes in the film where helium escapes. Air cannot fit through the holes in the film, while helium can.