delete-selection-mode, which you can start automatically by
placing the following Lisp form in your .emacs file:
According to the documentation string for
(which you can read using M-x describe-function RET
When Delete Selection mode is enabled, typed text replaces the selection if the selection is active. Otherwise, typed text is just inserted at point regardless of any selection.
This mode also allows you to delete (not kill) the highlighted region by pressing DEL.