Any process in which a centrosome is transported to, and/or maintained in, a specific location within the cell.