This report summarizes recent work proving the fundamental lemma, which is an important step in Langlands' endoscopy theory. The fundamental lemma relates orbital integrals of a reductive group to those of its endoscopic groups. The report provides examples of how orbital integrals arise in counting problems for lattices and abelian varieties over finite fields. It also discusses how stable orbital integrals and their κ-sisters are used in the stable trace formula to relate traces of automorphic representations to orbital integrals.