This is just a confirmation to Aesin's answer...
Say, we take copper. The expected electronic configuration (as we blindly fill the $\mathrm{d}$-orbitals along the period) is $\ce{[Ar]}\mathrm{3d^9 4s^2}$, whereas the real configuration is $\ce{[Ar]}\mathrm{3d^{10} 4s^1}$. There is a famous interpretation for this, that $\mathrm{d}$-orbitals are more stable when half-filled and completely-filled. That's a complete myth. There are very few pages explaining this myth, like chemguide.co.uk.
As we fill the electrons starting from $\mathrm{3d^1}$, we'd be stuck at chromium and also at copper. While filling chromium and copper, it has been observed that the energies of $\mathrm{4s}$ and $\mathrm{3d}$ orbitals are fairly close to each other. The increasing nuclear charge (as we go along the period) and the size and shape of $\mathrm{d}$-orbital should be a reason. This similarity makes the energy for pairing up electrons in d-orbital very less than that of pairing up in $\mathrm{s}$-orbital (i.e.) the energy difference between these orbitals is much less than the pairing energy required to fill the electrons in $\mathrm{4s}$ orbital. Moreover, the energy for the configuration $\mathrm{3d^5 4s^1}$ is much less than that of $\mathrm{3d^4 4s^2}$. Since we usually fill electrons in the order of increasing energy, the next electron (in case of manganes) goes into the $\mathrm{4s}$-orbital.
The same reason for effective nuclear charge makes the $\mathrm{3d}$-orbitals somewhat lower in energy than $\mathrm{4s}$-orbitals and hence, the unusual configuration of $\ce{Cr}$ and $\ce{Cu}$.
From a paper of Richard Hartshorn and Richard Rendle of the University of Canterbury (*.doc
file), which supports that this is quite untrue:
In the case of chromium, this means that $\mathrm{4s^1 3d^5}$ will be lower in energy than $\mathrm{4s^2 3d^4}$, because in the second case you have to "pay" the electron pairing energy. Since this pairing energy is larger than any difference in the energies of the $\mathrm{4s}$ and $\mathrm{3d}$ orbitals, the lowest energy electron configuration will be the one which has one electron in each of the six orbitals that are available. Effectively this is Hund's rule applying not just to strictly degenerate orbitals (orbitals with the same energy), but to all orbitals that are (significantly) closer in energy than the electron pairing energy.
In the case of copper, the $\mathrm{3d}$-orbital has dropped in energy below that of the $\mathrm{4s}$, so that it is better to have the paired electrons in the $\mathrm{d}$ and the unpaired one in the $\mathrm{s}$. The reason why the $\mathrm{3d}$ is lower than $\mathrm{4s}$ is tied to the high effective nuclear charge. The high effective nuclear charge gives rise to the small size of $\ce{Cu}$ compared with the earlier transition metals, and also means that orbitals in inner shells are more stabilised with respect to those further out for copper than for earlier elements.