If you are the legal next of kin for the deceased person, you can contact Apple Support and they will help you remove the activation lock. If you are not the legal next of kin, you will need to provide a death certificate and proof of ownership in order to have the activation lock removed.