(1) The function f is defined by f:x 1 - 4x, x R. Show that f is surjective (onto Z)

(2) The function g is defined by g:x 3x - 4, x Z. Show that g is not surjective (not onto Z)

I need help in understanding the term surjective/onto . I am aware that it means when the range of a function is the same as its co-domain, but how do i apply this in solving the above questions? Furthermore what exactly is the difference between the range of a function and the co-domain of a function?