When cornstarch is added to a liquid, it forms a gel-like substance. This happens because the cornstarch molecules are attracted to the water molecules. The cornstarch molecules absorb the water and swell up, forming a thick mixture.