Local adaptation is an important force underlying diversity within species. Local adaptation can also impact the function of communities and ecosystems. Here I demonstrate an approach to dissecting the genetic basis of local adaptation by synthesizing data from geographic patterns in allele frequency and replicated common gardens. I discuss a specific example of local adaptation of a host to its parasite via resistance mechanisms. Finally, I use models to show that local adaptation and temporal environmental shifts (e.g. climate change) can cause dramatic changes in community structure and ecosystem function driven by differences in the adaptability of component species.