This is a compilation about each of these “features”, based on documentation and information in the CoP.
Meaning
Deactivate a tracked entity (TE) (previously known as tracked entity instance): Deactivating a TE will cause the TE to become “read-only”. This means you cannot enter data, enrol the TE or edit the TE profile. Technically, the TE field inactive changes to true.
Cancel enrollment. Technically, the enrollment field status changes to CANCELLED. This is affecting only the enrolment in that program, so TE can be re-enrolled in that program or in other programs.
Analytics
Based on CoP, TE is considered for analytics (including PI) even if TE is deactivated (it is not considered if TE or enrolment is deleted).