Brake light switch? Could be a mechanical swiutch activated by the pedal arm or a pressure switch on the hydraulics. Each car is different. Unfortunately you decided we didn't need to know what the make and model of your car is so we can't help you any more.
If you can find the switch you could check you are getting 12V to one terminal (with the ignition on) and that 12V appears on bpoth terminals when the switch is activated.
From then on it's a case of elimnating everything in the circiut, one step at a time.
Some cars have frequent specifc problems. Shame you didn't tell us what yours is.
XXX, August 2015