The following outlines a method of playing forever given the following conditions, which apply in many Tetris products since 2001:
 the Random Generator is used to generate piece sequences
 the game has the Hold feature
 at least 3 piece previews are available
Standard procedure Edit
The general method is achieved by dividing the screen into self contained sections as shown below. Specifically, the 4 left columns, the 4 right columns, and the 2 middle columns will be treated as distinct regions, with specific pieces assigned exclusively to each region. Because the random generator provides strings of bags containing each of the 7 pieces in a random order, it is possible to construct a strategy around the relatively small variation, with looping patterns.
S, T, and Z will be placed to the left, L, J, and O will be placed to the right, and I pieces will fill the middle.
The S, T, and Z piece loop Edit

This pattern loops after 4 bags of pieces. Depending on the order of the pieces for each bag, you may need to use Hold to force a piece to come last. Piece previews are technically not required to play this pattern.
The Z piece must drop after T, so use Hold to change the order if necessary:
The T piece must not drop first, so use Hold to change the order if necessary:
Option 1 
Option 2 
The T piece must land diagonally adjacent to the other T, so use Hold to change the order if necessary:
Option 1 (needs 
Option 2 (needs 
The T piece must drop last, so use Hold to change the order if necessary:
The L, J, and O piece loop Edit
This pattern loops after a single bag of pieces. Depending on the order of the pieces, you will need to use a different construction. At least 5 previews are required to choose the appropriate construction. Alternatively, it is possible to use 3 previews and clever use of Hold (that does not conflict with the STZ loop's Hold needs) to choose an approriate construction using some advanced techniques.
O first (OJL, OLJ):
O last (JLO, LJO):
JOL: (mirror for LOJ)
Drop J 
Softdrop O 
Slide O 
Drop L 
Advanced techniques for when only 3 previews are available Edit
Worst case bag distributions such as H?XX?X? and H?XXX?? deserve a special mention. The first piece 'H' denotes a piece which must be placed in Hold in order to follow the STZ loop procedure. Pieces from the LJO loop are denoted by '?', and the remaining pieces are denoted by 'X'. Using 3 previews and Hold, it is only possible to see the first 4 pieces of the bag before the second piece enters the screen. This means you only see H?XX, and only know the first piece of the LJO loop. Because H must be put in Hold, you are forced to make a decision without knowing the order of the rest of the LJO loop. If the O comes first, you can follow the procedure above without problems. The rest of the time you will run into complications like this:
Impossible O placement (eg. HLXXJXO, HLXXXJO):
Impossible J placement (eg. HLXXOXJ, HLXXXOJ):
When L or J come first it is impossible to determine which LJO pattern to use without knowing the order of the final 2 pieces. The solution to this problem is to wait until the first L or J piece enters the screen before making a decision. With the held piece, active piece, and 3 previews, you now see 5 pieces into the bag. This allows you to tell the LJO piece order for the case of H?XX?X?. However, in the case of H?XXX?? the order remains unknown. With this final worst case, the STZ loop is guaranteed to be finished before the second and third pieces of the LJO loop are dealt. This means Hold is available! You can start building whichever pattern you prefer, and use Hold to change the order of the final 2 pieces as necessary.
Tricky starts when only 3 previews are available Edit
There is a worst case start that only complicates the very first bag when playing forever. With a sequence such as ?HXX?X? you can see a maximum of 4 pieces into the bag as you place the first piece. It is impossible to Hold the first piece (part of LJO) because the second piece (part of SZT) must be held. Additionally, because the second last piece is also part of the STZ loop, Hold cannot be used to change the order of the the final 2 LJO pieces as discussed above. So a decision must be made with only the first 4 pieces of the bag known. In this case, the solution is to note that the STZ pattern in the previous section requires the Z to be placed last. However, the mirror STZ pattern is equally feasible, and would require the S to be placed last. Because you have these 2 options, it is impossible that the first piece dealt for the STZ loop is required to be placed last. The worst case is now ?SZX?X?, which can be expressed as ?XHX?X?. By holding the first piece, placing the second, and holding the third, you can now see the first 6 pieces of the bag. This then allows you to choose an appropriate LJO pattern.
It should be noted that this affects only the very first bag of playing forever, which is not to be confused with the first bag of every 20bag loop of playing forever. On subsequent loops, the first piece of the first bag is already in Hold. You can see the first 5 pieces of ?HXX?X? after you put H on Hold, which makes the first piece active, and sums to 5 with the 3 previews. It is only a problem for the first bag of the game because the player is restricted to a maximum of one use of Hold before placing a piece.
The I piece loop Edit
This pattern loops every 2 bags. No use of Hold or piece previews is required. The player must simply alternate putting the I tetromino in columns 5 and 6 to reap tetrises.


Notice that the alternate JOL method will work only if the first I tetromino of the loop is placed away from the JLO heap.
Balancing the Stacks Edit
Since the loops have a cycle of 4, 1, and 2 bags respectively, after playing 4 bags they will all be flat. However, the I loop will have only placed 8 rows compared to the 12 rows placed by both the STZ and LJO loops.
The rows stacked 
