Really depends on what subject you're shooting. As Cobalt pointed out, there a a couple of ways you can achieve this, a light table being one of them. This is the semi transparent surface that you shoot on with some strobe light under the table. However, I really don't use this anymore because of the light spill. If you dial down the strobes to avoid light spill, then you end up having to use Photoshop anyway to get a pure white background. The second way is to have a dedicated workspace, again like Cobalt stated. This is when you have a white backdrop 8-10 feet behind your subject and that is lighted with separate strobes from your subject. 1-2 stops higher on the white backdrop (you can use a sheet if you don't want to pay of an more expensive Westcott backdrop). The challenge here is that you have to hang your shirt in such a way it looks flat (if that's the look you are trying to get...and based on your examples). Oftentimes when I hang stuff there is post processing involved to remove the stuff I hung it with. So you often have to pick your battles in terms of what kind of post post processing you end up doing. And the final recommendation is to cut out your subject. Here, you have to be careful to match the brush edge to the edge sharpness of your subject for it to look natural. Yes, it's time consuming, but a cut out allows you to place your subject on nearly any background.
See samples below. I can have a pure white background or a more interesting (probably less useful) grunge look to the background...all very easily now. Not sure if my post has answered your question, but there are more ways to skin a cat, so to speak.