Those are fun.
Your nail hasn't separated from your finger has it? Don't pull on it, you don't want it to fall off. Often, if the nail separates, you won't grow it back.
Ice it and see a doctor if the nail looks funny. And next time don't stick your fingers in places like that (car doors, between weights, etc).