Shingles is caused by the reactivation of the varicella-zoster virus, which remains dormant in the body after a chickenpox infection. It typically presents as a painful rash on one side of the body.