The messages stay in the original queue until the TTL for the message (or the queue) expires. The message must also have been published with “DMQ Eligible” flag set and “Respect TTL” must be set on the queue. When the TTL expires on the message it is moved from the original queue into the queue that was configured as the DMQ for the original queue (either a specific queue or the generic default system DMQ).
Once the message is moved from the original queue into the DMQ, the DMQ Eligible flag is removed from the message, so it will sit in the DMQ until it is processed or deleted. To process messages from the DMQ is the exact same process you would use to process messages from any other Solace Queue.