Placing a Cantaloupe in the crafting grid gives you a Cantaloupe Seed.
To farm the Cantaloupe, you plant and grow the seeds (or the Cantaloupe itself) on tilled soil, once they're fully grown you can right-click them, harvest the Cantaloupe and let them grow again. When harvested by right-click, the plant doesn't break, and yields 1-3 Cantaloupe.
Shapeless Crafting Edit
Here is a list of all recipes that use Cantaloupe:
Mods & Modpacks Edit
If you have Hunger Overhaul installed as as well, they grow best in Forest and Plains biomes.