Cactus Flowers can be found on "naturally grown" Cacti, and some more can grow in time on Cactus blocks under certain circumstances.
These flowers will also grow on blocks of cacti that you place yourself on any kind of blocks (except liquid lava) into any environment even in darkness, as long as place ca. 9 Cactus blocks or more together and take care to not let them catch fire.
Cactus Flowers have the shape of cubic blocks and can be placed too.
Cactus Flowers will also rarely be "dropped" by Trogs, Dried Leafies or Dustevils if you kill them; these flowers can also be harvested from these animals occasionally if you make them your Pets and feed them well.
Cactus Flowers can also be used as an ingredient in Basic Health Potions, Stone Mining Cells, Taming Collars, Golden Potions and Stamina Regeneration Potions - in crafting-recipes that will accept any kind of Flowers.
These flowers - like plain flower-less Cactus-blocks alike - can be placed as building-blocks too, as they have a cubic shape. However they can make aggressive Dustevils or Dried Leafies spawn, rarely even ordinary green Leafies and during ingame-nights in darkness perhaps also Night Leafies.
More details about how to grow Cactus Flowers: Edit
You can grow Cactus Flowers easily by placing Cactus blocks close together (best into one chunk 16x16x16). You have to place a certain number of Cactus blocks into an area until Cactus flowers will start to spawn randomly here or there. 9 blocks will be enough to grow 2 flowers.
You can put blocks of cacti onto any kind of blocks (yes, also crafted ones) to grow flowers - except for liquid Lava of course, as this would set Cactus-blocks on fire and consume them. Of course you will have to leave (1-2 blocks of) free space above the Cactus blocks so Cactus flowers can spawn on them.
On pillars looking like "naturally" grown Cacti, Cactus Flowers will spawn very quickly. If you build 1-block-flat platforms or just 2 blocks, it will take significantly longer for Cactus Flowers to grow than when building pillars of 3 blocks in height or more.
Cactus flowers will not grow on each cactus block or cactus-pillar.
Instead there is a limit for how many Cactus Flowers can grow within an area; so you can only grow a small number of Cactus Flowers at once, no matter how many more Cactus blocks you will add to this area. This also means that you will have to harvest the flowers before any new flowers will be able to spawn.
Examples: when placing 9 Cactus blocks together, only a maximum of 2 Cactus Flowers will grow. However if you place 12 Cactus blocks together, still not more than 2 Cactus Flowers will spawn. When placing 18 Cactus blocks, 3 Cactus Flowers can spawn, but not more.
You don't need to leave spaces between your artificial cacti, as Cactus Flowers will only grow on top (not on the sides) of Cactus blocks. But creating walls or large cubes made of cactus blocks sticking together would be a waste as flowers never seem to spawn directly next to each other (only diagonally). Occasionally 2 flowers might spawn on top of each other.
Cactus Flowers do not need any light to grow (Creativerse is not Minecraft), so they will grow very well underground, with or without torches placed nearby. They even grow well in snowy areas like Frozen Deserts, also on high altitudes, in Swamplands and even on the Corruption layer - as long as there is enough free space upwards so the Cactus Flowers can spawn on top of Cactus blocks of course.
These flowers are the fastest kind of flowers that you can grow yourself. You don't need to stay close to them to make Cactus flowers grow, but it's also not necessary that you stay away. Cactus flowers will also grow during (ingame-)nighttimes and while you're offline, but they don't take any specific amount of time like Seeds need to grow into Crops or Saplings need to grow into trees.
Cactus blocks are flammable like nearly all plants including trees; so take care to not place fire or torches too close to them, especially not under blocks of cacti in hot environments.
Also Hardened Lava, Igneous Rock and Sulfur can burn Cactus-blocks if you place them into any hot surrounding, as the environmental temperature will decide if flammable blocks will start to burn or not.
So if you try to grow Cacti on the Lava layer (which is not really recommended anyways), you should take care to leave at least 3 blocks of free space upwards, as otherwise cactus-flowers that grow on top might touch hot rocks and will set the whole cactus on fire, plus perhaps also other flammable blocks nearby as well.