While most cannabis doesn't spoil the way perishable food does (the exception of course being perishable edibles), eventually, the cannabinoids in your weed will break down, which means it will lose its psychoactive effects. Old weed won’t hurt you as long as there isn’t any mold growth, but it won’t be fun to use, either.
To learn more about how long weed can last as well as how to extend its shelf life no matter what form it takes, check out Does Weed Get Old? Cannabis Flower Expiration Explained on Mood.com.