depending on the vehicle, most have a circuit board where the rear lights go in then on to the rear light covers.these tend to go out with time. you should pull the plug and test the wires to see if they have fire. if they dont then it will be the brake light switch located on the brake pedal under the dash. if it does have fire then it is the circuit boards.
Look for a fuse labeled TAIL LIGHTS. There are 2 separate circuits, one for brake turn and flasher and the other is for tail lights.
It could be a blown fuse. Tail lights and brake/turn are on separate fuses. Apparently there is not a ground problem since brake/turn works OK.
On a toyota tacoma 2003 SR5 when the tail lights are turned on the brake lights come on and when the tail lights are of the brake lights work just fine what could be the problem. If the truck has a trailer plug, inspect the plug and plug wiring for damage and corrosion.
Are you saying your tail lights themselves do not work and only the brake lights work. If that is the case, check the fuse, and then check the tail light bulbs.
its on different bulbs
Check your fuses.
on some cars the tail lights and brake lights are totally different bulbs gain access to the bulbs and have someone push the brakes so that you can determine which bulbs are the brake lights and replace the tail lights
Check the brake switch at the pedal.
Those tail lights could be the brake lights you are seeing and that would be a faulty brake light switch or the brake light switch is out of adjustment.
Take a hammer to the tail lights then they will shut off but you might have to get them replaced or somting The tail lights you see may actually be the brake lights stuck on because of a faulty or out of adjustment brake light switch.
Fuse
go to a mechanic