At the beginning, wait for a few seconds while the program mixes up the squares. Once the mini layout tells you that you can put Scratch the Cat back together, you simply click (or drag) the pieces next to an empty slot to work out the puzzle!
I used to have this kind of puzzle, but then I lost it. Then I said, "Why not make one on Scratch?" All art and code by me. Music and sounds from the Scratch Audio Library. You should make a remix to add your own puzzle! :D