When there's thunder in the air the thunder creates a shock wave and those shock waves are what causes your house to shake and vibrate.
What causes the shock waves is heat that expands rapidly which creates the shock wave which then causes your house to shake during thunder.
Usually nothing will happen and you should be safe although it can be heart stopping sometimes and scary.