For ear protection, start with a combination of foam inside the ear plugs and ear muffs. Wallmart sells both for relatively cheap.
As far as the gun, rent before you buy. You might also want to take an introductory handgun class before you buy. Many classes will let you try a variety of guns.
A prefer longer barrel guns. They're easier to aim and the extra weight helps keep recoil down.