There's a bit of science involved, but the cornstarch absorbs water, and ends up locking together with other cornstarch molecules. Then, the water is cooked out, leaving behind air pockets that create a flaked, crispy exterior.