In your case, either the brake switch didn't trigger when you brake (which you might be able to tell from the brake lamp) or the solenoid didn't work (or didn't work effectively), or the connection between the two are broken.
If you're not used to fixing cars, take it to a shop. It shouldn't be very expensive to fix.