How do I set a variable in the install profile to enable users to sign up for the website I am trying to understand about how setting variables works in install profiles. As an example, how would I set the option to enable people to create a website for the account in the install profile? Here is the page on variable_set https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/variable_set but how do I retrieve the value.
Variables in install profiles work no differently to variables in a 'normal' bootstrap.

To set a variable use variable_set():

variable_set('var_name', 'value');


To retrieve it, use variable_get():

$var = variable_get('var_name', 'default');


To find the names of variables, the easiest method is to install the Devel module and visit the variable editor at /devel/variable