Its called the angle drive,and yes it makes connection of the cable to the gearbox possible as having it going straight in would not work.
They are prone to breaking.
If you look at it,you will see a small screw,which is where a bit of oil should be put in every now and then to lube it.
Unscrew the cable from it and turn the inner and see if the speedo turns,then unscrew the angle and look at the bit of cable that picks up the drive from the gearbox,as it is normally this that snaps.