One way of attaching flowers is by making them on toothpicks and pushing them in.
Another method (what I use) is to make the flowers on wire, then make a bouquet, once all the wires held together are wrapped with florist tape I then push the thick stem in a straw and push that into the cake.
I have also made an arrangement in a ball of gumpaste which was attached to a 1-2'' round cardboard covered with foil.This made it easy to just lift the disc and place on the cake with a dollop of buttercream under to attach.
Some bakers dip each in wire in chocolate and insert individually.HTH.
If they're just sitting on the top of the cake you don't necessarily need any toothpicks. Just attach them with icing if you need ot. Start on the outside and put them around the edge, then fill in the center.
I think what you mean is, how do you make the flowers raise up so they are not just sitting flat on the cake? If that's what you're talking about then what you need to do is make a mound of icing (I just use the open coupler on a bag of icing either the color of the top of the cake or sometimes you can use the same green you use for the leaves) using pressure to create a larger globs of icing, just squeeze out a mound somewhat smaller than your bouquet of flowers will be, making it around 1 to 1 1/2 inches tall in the middle, tapering off to just a little higher than the flat top of the cake on the edges.Then just place your flowers directly on this mound starting at the center. Once they are placed add your leaves. This adds dimension and really helps give the flowers a more natural rounded appearance.
You really don't need toothpicks or spikes piped on the back for the top of a cake. If you use wires you don't need the mound of icing because the wires are holding the flowers up in the right position.
I used a half a polystyrene ball covered in fondant for the ivory cake with roses on top in my gallery. Each rose was made on a wire, and I just inserted them into the ball.
You could also make a mound of fondant or buttercream and sit your flowers on that.
Thank you all very much, it was all very helpful!