Jovian planets are rather large and gaseous and do not have a easily definable surface. Terrestrial planets on the other hand are dense, rocky and small.
The nebular theory explains this based on the dividing point in the solar nebula (also known as the frost point). Within the frost line only metal and rock could form, outside of it, hydrogen particles could condense so more than metal and rock formed. How this relates to the nebula is that the terrestrial planets were too small to pick up helium and hydrogen from the solar nebula. The Jovian planets on the other hand, were so large they were able to gain hydrogen and gases from the solar nebula.