After obtaining the key, the character in the cage should mention it when you talk to them. After that, you can just break the cage by hitting it.