There couold be several reasons depending on the make, model, and year of manufacture of your vehicle. Since you don't mention this info, this answer will have to be of a generic, basic nature.
The brake lights are staying on because voltage from the battery is getting to the brake light wire(s). This could be caused by:
There could be some other reasons which I cannot think of right now. Good luck!
Check the brake light switch down on the brake pedal.
Sounds like it sticking from under the brake pedal. Have the brake switch looked at. It may need to be adjusted of replaced.
Check the brake light switch.
Brake Lights do not turn offUsually this is caused by the physical position of the brake light switch not being adjusted properly.
Brake Light switch works without the ignition on. unplug the brake pedal switch and check to see if the brake lights are still on..switch could be defective
turn the inside lights off
The brake lights won't turn off because the brake light switch on the pedestal of the brake pedal needs to be replaced.
Change out the switch. Bad switch!!
The brake light switch might not be connected properly. Remove the brake light switch for 10 seconds and replace it to its original position.
I had this problem when I shut off the vehicle while the brake pedal was still depressed. I would recommend you start the vehicle up, turn on all lights, then shut back off and turn vehicle off without have foot on brake pedal. These vans havea feature which keeps the lights on for a short period after the vehicle has been shut down, but I think there is a fault in this feature when you turn off the vehicle with the brake pedal pressed, which causes the brake lights to stay on even though the vehicle is off
There could be a problem with the relay being grounded. There could also be a bad fuse or the fuse connection.
In this order only. Turn engine off. Depress parking brake. Turn engine on. Lights will turn off. To turn lights back on relase parking brake.