Locators are used in Selenium to identify specific elements on a webpage. The common locator types are id, name, class, tag name, link text, XPath, and CSS. Id is the preferred locator since each element should have a unique id. Code examples are provided to find elements by id and name by passing the locator value to the findElement method. Additional XPath locator techniques include using direct paths, attribute values, contains and other string matching functions to locate elements.