The shell processes certain special characters, comparing them to the list of files in the current directory. Then the result is passed on to the actual UNIX command. The question mark is replaced by any single character in a filename. They get us a limited form of the question mark, allowing you to search for specific filenames by specifying a list or a range of characters. The brackets define a character class that includes all the characters listed within the brackets.
Square brackets are especially useful when combined with other special characters.