
Sometimes windows like this pop up. I can get out of with with :q but I wonder, how did i end up with this? Maybe there is some keystroke combinations involved but I have no idea. Can you link me with relevant information for this feature of vim?
It's the command-line window.
You invoke it with q: and you can read all about it in :help cmdline-window.
In short: you get access to your latest Ex commands and a chance to edit them and re-execute them with all of Vim's editing power.
it is command-line window. You could open it by pressing q: or ctrl-f (in command line)
to close it, you could :q
for more details, check :h q:
I think it is good feature. We can not only choose previous command from that window, but also edit command with vim way.
similarly vim has q/ too. search history.
As above answers refer, it is a feature called 'command-line window'.
Usually it is a typo of :q, you can disable it by
nnoremap q: :q
See other answers for explanation of "what" the window is.
I'll address how to close the window since that part seems to have been overlooked:
use <C-c> (ctrl + 'C').