Please help me with this line from Harry Potter and the Deathly Hallows [closed]

From Harry Potter and the Deathly Hallows, Gringotts, chapter twenty-six:

It was now packed inside the beaded bag, which, Harry was impressed to learn, Hermione had protected from the Snatchers by the simple expedient of stuffing it down her sock.

I am unable to understand the word expedient and its use in this context. And also, please explain the phrase stuffing it down her sock: how did she stuff a bag sewn into her sock?

Plus, try to elaborate as much as possible, as I am new to English it would help a lot.


to stuff, verb 2. a. To place forcefully into a container or space; thrust:

"He stuffed money into the bag."

Expedient: (noun)

2. Something contrived or used to meet an urgent need:

"She joined the university football team by the simple expedient of standing on the field and refusing to move off."