Maíz vs. choclo vs. elote

The words 'maíz', 'choclo', and 'elote' are all Spanish terms used to refer to corn, but they are used in different regions and contexts.

Maíz

This term is universally accepted in all Spanish-speaking countries to refer to the corn plant in general, its grains and the food derived from it.
El maíz es un cultivo importante en México.
(Corn is an important crop in Mexico.)
La tortilla de maíz es un alimento básico en la dieta mexicana.
(Corn tortilla is a staple food in the Mexican diet.)

Choclo

'Choclo' refers to the corn cob when it still has its kernels, primarily used in Peru, Argentina, Chile and some parts of Ecuador and Bolivia.
Voy a preparar una sopa con choclos y papas.
(I am going to prepare a soup with corn cobs and potatoes.)
Puedes añadir choclos al guiso como extra.
(You can add corn cobs to the stew as an extra.)

Elote

'Elote' is typically used in Mexico, Guatemala, El Salvador and some other Central American countries. This word typically refers to a fresh or cooked ear of sweet corn.
Vamos a asar unos elotes para la cena.
(We will roast some ears of corn for dinner.)
Los elotes hervidos con sal y mantequilla son deliciosos.
(Boiled ears of corn with salt and butter are delicious.)

Summary

'Maíz', a universally accepted term among Spanish-speaking countries, denotes corn in its most generic sense. Meanwhile, 'choclo', used mostly in South America, and 'elote', predominantly used in Central America, both commonly represent an ear of sweet corn.