I cannot really
recognize, whether local variables are destroyed by gc, or whether
they exist on stack and are destroyed "automatically" and end of their
scope?
Variables are not "destroyed by GC", objects in memory (that the variables refer to) are. When the objects in memory (tables, strings, userdata, ...) are no longer accessible from anywhere (e.g. local variables), they are eligible for garbage collection and might be cleaned up at some later point in time, at which point their __gc would be called.
__close is a way to deterministically execute some cleanup when a variable goes out of scope.