'Flour' is simply a dried and powdered vegetable product. Usually it's made from cereals, (wheat, rice, etc), but it can be made from all sorts of other things like peas, potatoes, or even sago.
But normally in cookery 'flour' refers to wheat flour, unless otherwise specified.
Cornflour, (also known as 'cornstarch'), is actually just the starch derived from cereal corn, and is used as a basic ingredient for thickening such things as custard or gravy. It can also be added to flour to give baked products a lighter texture.