An anchor drilled into concrete must resist forces applied to it by the weight load it supports. A shear load applies a force parallel to the surface of the concrete; a weight anchored to a wall wants to slide down the wall, and it exerts a shear force on its anchor. A tensile load applies a force perpendicular to the surface; a weight anchored to the ceiling wants to pull out of the concrete, and it exerts a tensile force on its anchor. Most situations will result in a combination of the two forces, and different kinds of anchors counter the forces in different ways. Some anchors expand to grip the inside of the hole they're drilled into, some rely on friction to hold on to the inside of the hole, and others use mechanical means such as threads to grab the concrete. The best choice of anchor depends on the load and the qualities of the concrete involved.
Solid cast concrete can provide a stable base for anchors, but the composition of the concrete should be considered. Dense concrete made with a fine aggregate holds up best, and old concrete that is crumbling or otherwise deteriorating may not be able to hold on to the anchor firmly. Positioning of anchors is important, as well; anchors placed too close to the edge of concrete can cause the concrete to break and the anchor to fail, and the presence of reinforcing bars inside the concrete may limit where anchors can be placed.
Typical concrete blocks have hollow spaces within them, and the hollow section of the block is the worst place to install an anchor. Holes drilled into these sections tend to chip and enlarge, giving the anchor an uncertain grip. The relatively thin walls of the hollow section do not have the strength of solid concrete, so breakage is a possibility too. Anchoring in the solid portions of the block is acceptable, but blocks made with a coarse aggregate, commonly called cinder blocks, are not as stable as high-density concrete.
Placing anchors in concrete mortar between concrete blocks, brick or stone is acceptable. Mortar composition varies, and hard mortars are better suited to low-impact anchors that don't exert much force when they are installed, while soft mortars are well suited to screw- or sleeve-type anchors.