I'd like to recommend the package company-mode. I found it easier to setup and config. For beginners, using the following configuration will enable the autocomplete out of box.
(use-package company
:ensure t
:config
(progn
(add-hook 'after-init-hook 'global-company-mode)))
Moreover, there's a lot of backends you can use for specific programming languages. The following is how to config auto complete for python.
(use-package company-jedi
:ensure t
:config
(progn
(setq jedi:complete-on-dot t
jedi:use-shortcuts t)
(defun user/python-mode-hook ()
(add-to-list 'company-backends 'company-jedi))
(add-hook 'python-mode-hook 'user/python-mode-hook)))