La is a d-transition metal (group 3), which means that its valence electron (most outer electron that determine the chemical behavior) is in a d-orbital. There are 5 different d-orbitals and so the total filling of them (with 10 electrons) at the various periods generate the block of elements of these d-transition metals.
On the basis of atomic number (number of protons in the nucleus) the first element after La is Ce. Cerium is the first element in which a 4f-orbital is filled with an electron (considered as in group 3 like a Lanthanide). Ce starts thus the block of elements of the so called f-transition metals. The electron configuration of the 4f-transition elements has in some cases (Ce, Gd and Lu) electrons in the d-orbitals because the energies between the 4f and 5d orbitals are very similar. The filled orbital has the lowest possible energy taking into account all the different contributions: electrostatic interactions, angular and spin momenta, etc.