The best sound is obtained when the microphone is as close to the subject as possible. Three types of microphones may be used: The built in-camera microphone, a shotgun microphone which uses shaped electronics to bring you closer to the subject, or a clip-on lavaliere microphone which is attached to the subject close to their mouth.
Listen to these three examples.
The built in mic on the camera doesn't provide much sound isolation as you can hear significant background noise.
The shotgun mic provides some directional sound isolation in a straight line. Some background noise can still be heard. The closer the microphone is to the subject, the better the sound.
The clip on lavaliere or lapel mic provides the best sound isolation It limits background noise and should be clipped on as high as possible on the shirt collar. The closer to the subjects mouth, the better the sound. Wires can be run inside clothing if convenient for a neater appearance.
With the camera microphone you heard all of the ambient noise and the dialog is obscured. While ambient sounds may be desirable in some instances, in this case it is way too much. The shotgun microphone offered improved dialog quality while retaining some of the ambient sound. The lavaliere microphone offered the best audibility of the dialog, keeping ambient sound to a minimum.