There's few worse positions in a fight than to have an opponent behind you.
Visibility
The biggest concern is that you can only see what's ahead of you, so an opponent behind you is effectively invisible. You cannot react to their motion unless they grab you and you can feel their position and their close proximity.
Reach
Except for the back-kick, there are few options to strike at an assailant directly behind you as the shoulder and hip joints don't go backwards well. A very close attacker can be struck with an elbow, a foot stomp, and perhaps a reverse head-butt, but these strikes have less power and precision than our practiced straight punches and kicks.
Multiple Opponents
When fighting multiple opponents, do not allow yourself to be surrounded. Try to keep all attackers within your field of view, preferably in each other's way.
It is debatable whether you should prefer to have your back to a wall. The assurance no one is behind you also means you have reduced your mobility. I often talk about throws having the effect that the large flat surface hurts to slam into, and a wall is just such a surface as well.
Strike Defence
If you are not being held, but realize an opponent is behind you, remember that all you need is a simple pivot to face the opposite direction. Keep you guard up and rapidly twist to face behind you.
If you believe the assailant is close, the spinning hammer-fist is the aggressive version of that turn.
If this is a multiple-opponent scenario, after turning to face behind you, you must move to a position where all assailants are on the same side.
Grab Defence
If you are gripped around the waist (a bear-hug) from the rear, drop into a horse-stance, grab their leg that is between yours, and pull it through while straightening your spine and/or sitting back. They will lose their grip and fall.
If you are choked from the rear, grab the arm (this is a must!) to control the choke. If you are an experienced jujitsuka or bartitsuka, this leads to a hip throw over your back. If you gained a little room to get your head out, duck down and pivot, the same way we escape from a head-lock or a guillotine choke.
I know these descriptions are vague. In class, we practice these maneuvers, and we'll soon have instructional videos for all of these topics.
I'll Take It
If you are so vulnerable when an attacker is behind you, that's a good tactic for you to adopt in a fight. Naturally, you need to be aware of their reversals, and how to press that advantage.