When you clog a tailpipe you block the engines exhaust gases so they cannot leave the engine and so the engine stalls or runs rough until it stall.
When the tailpipe is clogged or blocked and the engine's exhaust can't get out, the fresh fuel and air have no room to come in, so the engine bogs down and stalls.
Putting a rag in a tailpipe is supposed to block the exhaust and cause the engine to stall or not start.
But that would not really work because the pressure of the exhaust would push the rag out of the tailpipe and then the engine would stay running and start just fine.
Another reason some people have put rags in their tailpipe is for suicide because the thought is that blocking the tailpipe would cause dangerous exhaust gas and carbon monoxide to enter the vehicle and cause death.
But that too would not work like it's thought too because the rag too would be pushed out of the exhaust.
Even putting a banana in the exhaust or a potato in the exhaust would eventually be pushed out unless it was put way up in the exhaust pipe.
I tried that before and put a potato in the exhaust and it popped out of the exhaust and the engine ran just fine.
Some other reasons could be someone puts a rag in the tailpipe so they are not spotted by police and the rag would stop the tailpipe from smoking.