Sounds like the relay is sticking.

Somewhere there will be a relay that uses the low amperage feed from the switch to turn on a higher amperage feed to the bulb.
The relay will probably be a small black box about an inch square with 4/5 connectors on it.
Pull the relay out of the connector and the light should go out.
The relay might be near the battery/ fusebox or near the headlamp.

Simple and cheap to fix, once you have found it.