The code editor tries to help you see what code groups together. For instance, it draws small lines between matching block beginning statements like IF, SELECT CASE and their closers (END, END IF or END SELCT):
If you click on the lines that match up, all the lines of code in between the opening line and closing line will be selected.
Clicking on the small + icon will collapse the entire block. A second click will expand it again.
Watch this Power User IDE Tips video for more Code Editor tips. If you have questions about the Code Editor, ask me here or ask the community on the Xojo Forum.