A variable is used to store information. If it is declared outside a procedure then it can be changed by any script in the file. However, if it is declared inside a procedure, then it is created and destroyed each time the procedure is executed in the file. Arrays are used to store a series of data items that are related.
Session variable store information about a single user and are available to all pages. Application variables are available to all pages in a single application. They are used to store information about ALL users in a specific application.