There are multiple possible causes for the headlamp staying on even after turning off the ignition. However, as MudderChuck explained , the lamp should extinguish after the timer times out and, it should extinguish at once after shutting off the lamps prior to turning off the ignition. If not, the possible causes are; faulty relay, faulty multifunction switch,Faulty feed circuit or Faulty BCM inputs or outputs.