Why does your headlights work when your tail lights dont and your tail lights work when your headlights dont on your 94 ford ranger splash?

one of two things, BAD EARTH, or Relay switch.