It means to have what you're doing suddenly and unexpectedly stopped. Imagine if you were standing on a rug working on a project, if someone pulled the rug out from under you, your work would stop and everything around you would stop.
The full quote is 'Pulled the rug out from under me.'
Eg. 'They pulled the rug out when they cancelled the delivery of the blocks.'
'I had the rug pulled out from under me when Jim didn't finish his part when he said he would.'
I hope that helps