However, if the brake warning light is still on, the other possible reason is that the car brake fluid level is low, check your car if it has sufficient amount of brake fluid. Open the hood of your car and locate the brake fluid reservoir, usually it is located a top of brake master cylinder, just shake the vehicle slightly to see where the fluid level, do not remove the reservoir cap.
If the brake fluid have an insufficient amount, add a necessary amount of brake fluid just enough to fill up the brake fluid reservoir. Avoid leaving the brake reservoir opens for a longer time because the brake fluid will be contaminated by moisture in the air which may result in a much bigger problem. Bring your car to a reputable repair shop to check why your car brake fluid is getting low as it might have leak somewhere in the brake system.
For instance, after checking you found out that the brake fluid is sufficient, then the problem is cause by imbalance pressure in the hydraulic system, imbalance pressure is cause by a lot of things such as collapsed brake hose, a damage brake line or an internal leak on the brake master cylinder, in any case have the car towed to a nearest repair shop so as not to compromise your safety because something might seriously wrong in the car brake system making the car not safe to drive.