You use it after the
dd commmand. Because you've copied over the partition table, you'll need to first inform the kernel of the change, e.g., by running
Basically, what's happening is that there is a unique value (a UUID) stored in filesystem metadata. When you copy whole partitions (as you're doing with
dd), you wind up with two partitions (and thus two filesystems) with the same UUID. So much for it being unique! This is a problem if, e.g., you try to use a UUID to mount the filesystem.
In order to fix the problem, you change the UUID on the copy—that
tune2fs line does so. You need to run it on each partition on the destination disk that contains a ext2/3/4 filesystem. You'll need different utilities for other filesystem types.