Geotechnical engineering is a branch of civil engineering that focuses on the behavior of earth materials and their interaction with structures. It involves the analysis, design, and construction of foundations, slopes, retaining structures, and other systems that are made of or supported by soil or rock.