How variable_get and variable_set works in drupal
Variables created through variable_set() and variable_get() are stored in the variables table in the database.

variable_set('myvar', 'my_value') 
is used to change the value of an existing variable to the provided value, or to create a new variable with the provided value if none exists.

variable_get('myvar', 'optional_default')
is used to retrieve the value of myvar. If myvar does not exist, then it is created using the value from optional_default. If optional_default is not specified, then myvar defaults to Null.