The “goto” statement is one of the very essential commands in every language. It just tells the program to jump to a label, a different part of the program and commence the execution there.
It is like a function, like a call just that you don’t expect the execution to return to the original place.
The “goto” as a command was getting a lot of shit over the years but most people have learned by now, after all the “Goto considered harmful” hype of the late 60’s, that this command is essential and important and that you can’t do without it.
There are many examples, like the implementation of state machines, that is essential the goto, while I would argue it is the “on X goto A, B, C”, but that’s an other thing that’s missing in most modern languages.
Language designers were trying to get rid of it, with the result that most languages came to senses and reimplemented it.
For example Lua 5.2 did so after trying 25 years without it. And with that LuaJIT did.