I bought a flash online and in the package there was a bonus set of transparent plastic color strips. I've been scratching my head wondering what are they for and how can they be used?
They are gels for coloring the flash. Used for creative effect or to color match the ambient lighting.
CTO (color temp orange) is for matching the flash to incandescent lights or sunrise/sunset.
CTB (blue) is for matching with cooler sources (cool LED's, shade, etc)... it was originally intended to shift tungsten sources to daylight so it's not used for correction much with speedlights.
CTG (green) is used to match with fluorescent lighting... but these days the color of fluorescents tends to be much better and it's not needed as much.
Those are coloured filters to put in front of the flash, simply to change the colour of the light. There is really not much more to it. In the film days, it could however make sense to e.g. use a yellow filter on the flash if you used colour film balanced for tungsten or indoor lighting. Flashes have colour temperatures similar to daylight and if using a tungsten film, especially slide film, unfiltered light from a flash would appear bluish.
It can make sense to e.g. use a yellow or orange filter to give the flash a warmer tone or a blue filter to give the light a cooler tone. The effect can however easily turn cheesy, so use with care.
In addition to coloring the light of the flash to match ambient lighting, the other fun colors (or colors created by combining gels) can be used to create all sorts of interesting effects. For instance, flashes are often used not as primary light for a photo, but as effect light or other secondary purposes.
Jeff Carpenter illustrates this in his Petapixel article, How to Easily Use Gels to Create Virtually Any Color Background. The basic gist is to aim a gelled flash at a wall or other surface close behind the subject. Flags (light-blocking boards) are used to control the spillover light to reduce the amount of effect light that accidentally illuminates the subject.