Shingles is a condition caused by the varicella-zoster virus — the same virus that causes chickenpox. Shingles itself is not contagious. You can’t spread the condition to another person. However, the varicella-zoster virus is contagious, and if you have shingles, you can spread the virus to another person, which could then cause them to develop chickenpox.
The varicella-zoster virus will stay in that person’s nerve tissue for the rest of their life. For most of that time, the virus stays in an inactive state. But if the person’s immune system can’t contain the virus, the virus could then activate again years later. This could cause the person to develop shingles.