An electric field in a conductor is formed when excess charges are present on its surface. Electric field lines originate from positive charges and terminate on negative charges, indicating the direction of the electric force experienced by a test charge. Within the conductor, the electric field is zero due to the movement of free charges that cancel out any internal electric fields. The electric field outside the conductor is perpendicular to its surface and is directly proportional to the surface charge density.