From Teverse

nil is a data type signifying that there is no value available. Nil can be found in many methods and other sources.

Printing the value of a variable that is not defined.

print(undefined_variable) -- nil

Explicitly setting something to nil and then printing it.

local v = nil
print(v) -- nil