Geotechnics is the branch of engineering that deals with the behavior and properties of soil, rocks, and other geological materials as they relate to civil engineering projects. It involves the application of geology, soil mechanics, and rock mechanics principles to analyze and design structures and foundations.