WELL, don't panic too much.
Is the nail stll attached?
if the nail is still attached, but his toe looks croocked, he may have borken a toe, OR ripped the nail out, this happens from time to time. Keep an eye out for infection.
it might be advisable to take him to a vet, just make sure everything is ok.
Please post a photo of said foot.