Hi there,
The quickest way to do this would be to remove the catch if possible and see if you can find or see the actual cable which has come loose from the back of the catch. If you can get to the cable you can use a pair of pliers to pull it though and therfore release the bonnet.
As for reconnecting it, you'd need to find out why it happened in the first place, i.e. has the catch actually broken then replace that. The worst case scenario is that the cable may have broken somewhere between the catch and the bonnet relase which means that releasing the bonnet is a job for garage as it would mean raising the car up from the ground fully.
Hope that is of help.
Tone
November 2008