The removal of a sample of cells or tissue from the body for examination, often to help diagnose a disease such as cancer.