It's not so much what trees, as how close you want to get the tree to the wall. Actually, what you are concerned with is that the roots will break the walls. What happens is that a tree root system, often up to 3 times the width of the upper crown of the tree, is constantly searching for water, especially during dry times of the year. Those roots, moving unseen beneath your soil, when they encounter a cement foundation, will very resourcefully dip down beneath the concrete, slurp water up out of the soil. The soil will then shrink, which removes the support from your concrete base, which then cracks. If it cracks, the walls supported by the foundation will begin to sink, get out of plumb and, yes, crack. Most tree roots are in the top 12" or so of the ground, and they actively will compete for water from that soil. Some trees, like Liquidambar styraciflua (Sweetgum) and members of the Acer (maple) genus have roots that rise to the surface to improve their access to moisture and oxygen.
This article from the Morton Arboretum Tree Roots and Foundation Damage explains the problem far better than we can. The main point of the article is that the tree roots didn't start out to destroy your foundation; it started out looking for water. When the roots came to your foundation, they dipped down below the house looking for moisture. Having found it, they have a nice drink, pulling water out of the soil, and causing the soil to subside. The soil, which is the support for your house, started shrinking and, without that support, the cement started cracking.
A tree that grows very tall is going to need lots of space under ground (and not very far down from the surface) to gather sufficient nutrients from the soil, storing water and, perhaps most importantly, anchoring that tree in the ground. You have heard the expression "top-heavy" we are sure; apply that to a large tree and you can perhaps visualize a tree that topples in a wind or even if someone leans against it. And with an instinct for survival, tree roots stand up for themselves, or perhaps we should say "push up" because they will push up sidewalks and driveways, as well as crack foundations in search of water.Remember that roots are radiating out in all direction from that trunk for as much as 2 to 3 times the width of of the top of the tree.
The time to deal with the problem of roots getting into foundations is to address the problem before you ever select or plant a tree. An itty-bitty oak planted next winter (you know we only recommend planting trees in December and January, when they are dormant, don't you?) can easily be fitted into a space maybe 6 ft. from the foundation. A great big shade tree will have roots radiating under it for many more feet than the size of the visible crown of the tree. The upper branches will be trying to get in the windows of your house and assisting termites and rats to access the roof of your house and entrance to your attic. The main thing to remember is that a small newly-planted tree can do two things: grow or die.