What is the hole next to the wax filter on hearing aid?

That is the vent. The vent allows for some sounds to enter your ear naturally as well as provide ventilation for your ear canal.
Natural ventilation is important because it prevents the 'plugged up' or occluded sensation you would get if your ear was completely closed off with the hearing aid.