bash uses $ character to indicate variables. for example, you can see your current environment variables with the env command. then to see a specific variable echo $var to print its value.
scripts may call variables for a variety of reasons. one common case would be collecting information from the environment it's running under to determine whether it's compatible.