Fixing to masonry is common in DIY, there are a wide range of suitable fixings for this purpose. By masonry we mean Brick, concrete or stone. Aerated concrete blocks (Thermalite) is covered here Fixing to aerated concrete
If you are fastening to the inside of a property then it is likely that the walls will be plastered. Drilling through the plaster should be done without hammer action on the drill as this can crack the plaster. Also when you drill the hole it is a good idea to drill it a little deeper than the depth of the plug, then you can push the plug straight through the plaster into the masonry and so the plug will then grip the masonry and not the plaster when the screw is tightened. If you leave the plug in the plaster and you use a large screw then you can easily crack the plaster.
Remember that a internal wall can be as thin as 4 inches, so great care has to be taken when drilling into walls.
Masonry Screws are the quick, modern way to fasten to masonry, but en using these you must ensure you use the correct diameter drill bit for the screw, you must also ensure that you drill the hole deep enough or you can crack the masonry.
Wall plugs are probably the most common type of solid wall fixing. They are cheap and easy to use!
Thrubolts are a form of shield anchor and are excellent for heavy duty fastening.
For heavier fixings you can use an injection fixing and studs- Resin Fixings