When you call setf on a variable that aren't in scope, Lisp assume it's a dynamically scoped special variable, not what you want. If you want to create "temporary" variables, use the 'let' construct.
What you were probably going for is this:
(defun inverseword (word)
(let ((x word) ; set up local variables
(while x ; no paren around x, b/c otherwise
; we're calling a function called 'x'
(push (car x) y)
(setf x (cdr x)))
y)) ; return it
(inverseword '(h e j)) ; Returns '(J E H)
This is essentially equivalent to the 'imperative' version I gave earlier, though I use the 'dolist' construct to iterate though lists instead of manually setf-ing x.
And no the while macro is not ok... the apostrophe should be a backtick. and 'rest' should be '&rest' or '&body' (they're equivalent).
(defmacro while (test &body body)
(let ((x 0))
(while (< x 10)
(incf x))) ; prints 0 through 9