Don’t pull it off. If part of the nail is still healthy and attached to the nail bed, trim off the detached area and leave the healthy part to regrow. Keep the toe covered and see a doctor to check whether additional care is needed.