If you are new to animation and you want to develop a good main game loop, I highly recommend reading (online) chapter 2 of:
http://fivedots.coe.psu.ac.th/~ad/jg/Or just buy the book, as I did. At the end of the chapter you will have a clear idea of how a good ani loop should work. Then it should also be much easier to understand the code you copied from gaffer.com.

Key to your Tetris animation will be to choose a fixed timeslot and do an update() once each timeslot, and then render. If rendering falls behind, you compensate by doing more update(), until the updates are in synch with the time.