By default the OS will attempt to pick the most suitable resolution for a connected HDMI monitor. You can also select a setting yourself
Viewing Resolutions Supported By Your Monitor
tvservice -d edid
Editing The Config File
sudo nano /boot/config.txt
If hdmi_mode and hdmi_group are commented out (# character at the start of the line) then the RPi will automatically select the resolution. Un-comment them and select a pair of values from http://elinux.org/RPi_config.txt which your monitor supports to use a fixed value.
Save and exit using CTRL+X, then reboot:
sudo shutdown -r now