A lot of these are unlocked by purchasing them, but a select few can only be unlocked by completing challenges or participating in events. Some of the most notorious sprays to have for heroes are the Cute and Pixel sprays, which require you to complete challenges with each hero to unlock them.