The block follows your cursor and leaves a trail. When you get back to an area already yellow, the area surrounded by your tail becomes yours. Don't hit your tail!
Thanks to nini2009ph for the original.