You can interact in Common Lisp through a console within a REPL loop (READ-EVAL-PRINT Loop). So every expression is read, evaluated, and the result of the evaluation is printed;
CL-USER> (defun test (testvar)
(format nil "Your input is ~A" testvar))
TEST
CL-USER> (test 3)
"Your input is 3"
CL-USER> (test 'symbol)
"Your input is SYMBOL"
CL-USER> (test "string")
"Your input is string"
CL-USER>
The format function (reference) when its second argument is nil, returns as string the result of substituting in its second argument (a format string), special marks, like “~a” “~s”, etc., with the remaining parameters.
If the second parameter of format is instead t or a stream, then the formatted string is output to the stream specified (or, in case of t, to the special *standard-output* stream, that initially is the same as the console), and the result of format is returned (and then printed by the REPL). For instance:
CL-USER> (defun test (testvar)
(format t "Your input is ~A" testvar))
TEST
CL-USER> (test 3)
Your input is 3
NIL
CL-USER>
In this case NIL is the result of the format function. Note also that, differently from the first case, in which Your input is 3 is printed surrounded by double quote (since the result of (format nil ...) is a string, and is printed by the REPL as such), the output is left intact from the printing operation.