If black holes are so small, how can they contain all of the matter they pull in?
Simply because they are
Any object with mass exerts a gravitational force on objects near it. Normally, that force is largest at the surface of the object, and not necessarily terribly strong even there, because large masses usually take up large amounts of space, meaning that their surfaces are far from their center, and the further you are from the center of a more or less symmetrical (usually spherical) mass, the less its gravitational force on you.
However, a black hole is a region surrounding a singularity
-- a mass that has zero size. This means that there is no limit to how close you can get to its center, and still not reach its surface. As a result, the gravity at the singularity itself is essentially infinite. Further away, the gravity is smaller, and at large distances it is no stronger than the gravity of any similar mass at that distance. So for instance, if the Sun shrank to zero size, at our orbit there would be absolutely no change in its gravitational force on us, and we would continue to orbit it exactly the same as if it were normal size.
However, right now, if you head toward the Sun, its pull on you can only increase in the normal way (due to your smaller distance from its center) until you are near its present surface. As you pass through the surface into the interior (ignoring the fact that you would be vaporized as you did so), the gravity continues to rise, but not as fast as you might expect, because part of the Sun is now outside you, and it pulls you equally hard in all directions, so that its pull cancels out. By the time that you are 90% of the way to the Sun's center, 90% of its mass is outside you, so only the innermost 10% is still pulling you inwards. That 10%, being ten times closer to you than normal, pulls you 100 times harder than normal, so at that place you would weigh 10 times more than at the surface. But if we could somehow compress all of the 90% of the Sun lying outside you into the innermost 10% of its size, you would weigh 100 times more than at the surface, not merely 10 times as much.
Continuing to the center of the Sun, if you were exactly at that point, all of the Sun would be outside you, pulling you equally hard in all directions, so there would be no net gravitational force on you, and you would be weightless (you would still be held in place by the weight of everything sitting on top of you, but your own weight would be zero).
Now in a black hole, unlike a star like the Sun, everything is
in the middle, so if you were also there, you would feel its entire "surface" gravitational force, infinitely multiplied by the fact that you were "right there". However, if you were to back away from the singularity (you couldn't actually do that, because of its infinite gravity once you are at the center, but this is a "thought-experiment", so we can do anything we want to imagine), then the gravity of the singularity would rapidly decrease, until (when you reach what used to be the surface of the star) the gravity would be the same as if the singularity expanded to the original size of the star.
Now, as to how can black holes, despite their small size, hold onto whatever falls into them:
Very close to the singularity, gravity is essentially infinite, so nothing can get away from it, and anything near it will very quickly fall into it and become part of it (increasing its mass, but not its size, since it has no size at all). But as you "move" away from it, its gravity decreases. At very large distances, its gravity is no more than it was when it was a normal star, and things can go by it or even right through where the star used to be, and just keep on going (although their paths would be bent, at least somewhat, by its gravity).
Somewhere in between these extremes -- right at the singularity, and far from it -- there is a region where gravity is very, very large, but not infinite. The closer you are to the singularity, the larger the gravity is. The further you are from it, the less the gravity is. There is a certain distance, called the Schwarzschild radius, at which the gravity is just strong enough that nothing, including light, can avoid falling into the singularity. The region of empty space at that distance is called the "event horizon", because anything that gets closer to the singularity than that will inevitably fall into the singularity, and any light emitted by it as it falls will never escape from the "black hole" (the region inside the event horizon), so we will never be able to see it. That's why the region inside the event horizon is called a black hole. It is a hole, in the sense that once something gets inside it, it can never get out again (there are certain unlikely circumstances in which pieces of atoms can escape from a region just inside the event horizon, but that is beyond the scope of this discussion). And since even light can't escape from the region, it gives off no radiation, and is therefore "black".
However, the size of the region that nothing can get out of is very small, because the gravity has to be tremendous for that to happen. For a star like the Sun, which is currently the best part of a million miles across, the size it would have if it could become a one solar mass black hole is less than 4 miles. Even for a 100+ Solar mass star (the most massive star possible), the diameter of the "black hole" would be less than 500 miles. So black holes are indeed tiny. But because they are tiny, if you happen to be inside one, you have the gravitational force of an entire star pulling on you, and pulling on you much, much harder than usual, since you are so close to its center. It is that fact -- that you can get very close to the center and still be "outside" the star -- that allows black holes to hold onto anything that falls into them.
I have to leave in a few minutes (in fact, should have already left), so I don't have time to proofread this. Hopefully I have not made enough grammatical or spelling mistakes to detract from the clarity of the answer, but if there is anything that is too muddled to follow, let me know and I'll correct the error when I return.