Convection does not occur in solids because the particles within are too tightly packed to facilitate the process. Convection requires actual movement between the particles within a substance in order to transfer heat which is only possible in a fluid state of matter such as liquid or gas.
In convection, heat is transferred through the mass motion of a fluid. This movement creates heat currents that draw heat in specific directions and allow it to circulate throughout the systems. Liquid and gaseous substances have particles that are free flowing within the substance and allow the currents to travel through without disrupting the overall state of matter. Solids are composed of particles that are tightly packed and do not allow for much motion other than wiggling and collision.
Solid substances can transfer heat through conduction. Conduction is the process by which agitated particles in substance collide with nearby particles and pass on their energy. Liquids and gases can also transfer heat through conduction, but they are less efficient at the process because it requires direct contact and collision between particles. The thermal conductivity is related to electrical conductivity and both can vary greatly depending on the chemical compounds or elements, although generally speaking the best conductors of both are metallic compounds.