As root you need to edit /etc/apt/sources.lst
Then add contrib and non-free at the end of each line that begins with deb and deb-src just like the example:
deb http://http.us.debian.org/debian jessie main contrib non-free
deb http://security.debian.org jessie/updates main contrib non-free
Save the file, and run ‘apt-get update‘ and optionally ‘apt-get upgrade‘ to activate the changes.
Unfortunately, this does not work currently with the new sources format, see https://stackoverflow.com/a/78720328.