Use a primer coat suitable for the surface you are painting. Often, an unstable paint surface can make the paint bubble as you apply it. There is a comprehensive list at the Resource link below to find what primer to use for your particular surface.
Tap the base of the paint can lightly before pouring out the paint. Five or 10 light taps on a solid floor or counter will bring some of the air to the top and out of the paint. Also, drop the can gently from a height of several inches.
Use a roller with a low nap. You need thick naps for course surfaces. Cement block or brick requires 1/2 inch or more of nap. You don't need that thick a nap for most interior jobs, though. A 3/8 inch nap is the customary choice for drywall, but if you are getting a lot of bubbles try 1/4 inch. In addition, get a good quality roller. The cheaper ones have less dense fibers. Also, the fibers are more likely to fall off during application. This can increase bubbling and leave unsightly fibers on the wall.