It's a vivid imagery-based expression, evoking the feeling of being so scared that your legs tremble and you feel weak. The "boots" represent the physical manifestation of fear, as if your body is physically shaking inside your shoes.
Here are some examples of how to use the idiom:
* "I was shaking in my boots before my presentation, but it actually went well."
* "The kids were shaking in their boots when they heard the thunder."
* "He was shaking in his boots after the police arrived."
The idiom is typically used in informal situations and can be quite humorous. However, it can also be used seriously to describe a very real and intense fear.