If you are a beginner, we recommend a relatively short session, under 20 minutes. You want to get accustomed to the sensation - when we're aroused, we may want to push our limits, so make sure to be mindful and listen to your body.
Experienced plug users may want to leave theirs in for a few hours - whether they are doing edging play, pleasing a dominant partner, or are just turned on by the idea of wearing one around for a while. The duration of time is completely up to the user and their risk-assessment for their own comfort (which is why experience and knowing your body is key), as the longer a plug is worn, the higher the risk of irritation or injury.
Remember: Always use ample lubricant, don't push yourself past your limits, and immediately stop play and remove your plug (slowly and safely) if you experience pain, numbness, burning, or irritation.