Quickest way is to open the scripts panel, right click on any script there, and choose "Edit". This will launch ESTK (ExtendScript Toolkit), and there's a console Window there.
Otherwise, just open ESTK from your operating system. Once it's open, on the top left, there's a dropdown that tells ESTK what app to link to. Select InDesign (the version you're using), and now the console window will work.