When you see lightning and hear thunder but see no rain then that's what is called a dry thunderstorm.
During a dry thunderstorm rain is actually happening and falling from the clouds but the rain evaporates in the air before it hits the ground since the rain drops are so small and not coming down very hard.
The rain comes from what is also known as an anvil cloud and since the rain comes from a higher part of the cloud the rain is not seen since it evaporates before it can reach the ground.
Dry thunderstorms also create an increased danger for lightning strikes since the air is dry.