Planes shake when they travel through a cloud due to simple science. Air rises from the earth as it is armed, and as it rises it will cool. Inside a cloud this happens much lower than in clear air, as clouds are more dense than dry air. Water vapor is not spread out evenly and so combined with thermal turbulence and the cooling rate of the air, air will draft through the cloud.
So, for you sitting on the plane, it means that there are unpredictably patterned air pockets on the wings. This causes the feeling of rising and falling, this can be rather pronounced and so this is when it is considered turbulence, and you will be asked to remain seated with your seatbelt fastened.
Pilots can expect turbulence in clouds as they know the science behind why it happens. Turbulence can also happen outside of clouds too, this is when it is a bit more unpredictable, coming as a surprise. This is what will often cause injuries from falling people or falling luggage.