Compost improves clay and sand by the same mechanism, it builds aggregate structure. The effect is modest in year one, noticeable by year three, and substantial after a decade of consistent application. Below: the practical detail on improve garden soil, and what most guides leave out.
Improve garden soil.
What it does to clay
Clay particles are tiny and pack tightly. Organic matter and the glues produced by soil organisms bind them into crumbs, creating pore space. The soil drains better, warms earlier and becomes workable over a wider moisture range.
What it does to sand
The opposite problem, the same solution. Organic matter holds water and nutrients that would otherwise drain straight through.
Why it takes years
Organic matter is continuously consumed by soil life. Raising the organic content of a soil by even one percent takes repeated annual applications, because you are refilling a bucket with a hole in it. The structural gains accumulate anyway.
What speeds it up
Stop digging. Keep the soil covered. Apply compost annually rather than heavily once. Grow something in every season if you can. Living roots feed soil biology in a way that added material cannot.
Manage expectations honestly. One application to a heavy clay bed will not transform it this season. Five consecutive years genuinely will.