The amount of fat and sugar in a cookie dramatically affect the texture. Chewy cookies have more sugar in the recipe than do flufier cookies. Another important consideration is the amount of leavening agent added to the recipe. If you add additional baking powder to the original Nestle's Toll-House cookie recipe, the cookie will be drier, rise much higher, and become more cake-like. And again with the Toll-House reicpe, the chewyness/crispness depends on the amount of time in the oven. Longer cooking time, and we're not talking more than a few short minutes here, will make the cookies crispy instead of chewy. My wife loves chewy, so I cook them about eight minutes a sheet, and then start checking to see if they are done. They should be soft in the oven, but with the edges just starting to brown. And they have to be removed immediately from the cookie sheet and onto parchment paper, or paper towels to cool.
Of course, higher fat and flour cookies will always be more crunchy. Think short bread, with its soft crunch, or vanilla wafers. They can be soft, but will never be chewy.
To understand the concept, think about what happens to sugar as it is first dissolved in water and milk, and then cooked to above-=boiling point temperatures. It first turns syrupy, then into a soft caramel, and then to a firm caramel, and finally into a brittle. The same is true of the sugar in cookies, at least ones with sufficient sugar in them.
Hope that helps.
Seeeeeya; Goodweed of the North