the difference is that heavy atoms are calculated with two d functions and hydrogen atoms with two p functions by the basis set 6-311g(2d,2p) and just with one function d and p for heavy atoms and hydrogen, respective.
So this means that the 1st row atoms are calculated with 22 basis functions and hydrogen atoms with 6 basis functions for 6-311g(d,p) and 27 basis funtions for 1st row atoms and 9 basis functions for hydrogen by the basis set 6-311g(2d,2p). But this takes a lot more computation time because more functions has to be solved.
I also agree with Andrea. So, I add some more lines regarding the answer.
The difference lies in the presence of diffuse and polarization functions. The "(d, p)" in "6-311G(d, p)" indicates the presence of diffuse functions (d-type) and polarization functions (p-type). The diffuse functions are added to account for electron density far from the nucleus, while the polarization functions improve the description of electron correlation effects.
On the other hand, the "(2d, 2p)" in "6-311g(2d, 2p)" indicates two diffuse and polarization functions are added. This basis set has a higher level of electron correlation and provides a more accurate description of the electronic structure of molecules compared to "6-311G(d, p)".