Mechanical anchor fasteners use friction to anchor themselves in place. The most common type of anchor is designed to expand in diameter when it is pushed into the hole. This expansion grips the base material tightly and causes the anchor to be firmly wedged in place.
This is similar to the way wall plugs are used when screwing things into a wall. A hole is first drilled and the wall plug inserted. The wall plug is a small piece of plastic or wood, or any material that is slightly flexible and compressible. A screw is then inserted with force, which causes the wall plug to be pushed against the base material as it is forced into the narrow gap between the screw and the wall. This pushing force is what anchors the screw in place and keeps it from falling out.
In mechanical anchor fasteners, the diameter of the hole that is drilled is critical. It must be just right. If it is too large, the anchor may not grip the sides of the hole sufficiently, and may fail when subjected to loading.