What actually happens to your money if a bond issuer defaults? Has anyone been through this?

I keep reading that AA rated bonds are low risk but not zero risk. fair enough. but what actually happens if a company actually defaults on a bond I hold? like what is the process? do I just lose everything or is there a recovery mechanism?