When I took those two pictures, first I zoomed in to the maximum, set the aperture to the biggest (smallest number, in my camera it is F3.5). Sometimes I turn on the macro function of the camera (the little flower symbol). I make sure there is nothing nearby the flower I want to take, nothing within close distance, especially behind my flower. Then focus on the center of the flower, or the bee. This way, anything that's not near the focus point will be blurry, the further away the more blurry.
If I have a lot of patience and want a great photo, then I play with depth-of-field 景深, which is harder to explain here.
The best way to learn is to read a photography book while trying something on your camera, then discuss with other people.
What camera do you have?