Placing an Rye in the crafting grid gives you a Rye Seed.
To farm the Rye, you plant and grow the seeds (or the Rye itself) on tilled soil, once they're fully grown you can right-click them, harvest the Rye and let them grow again. When harvested by right-click, the plant doesn't break, and yields 1-2 Rye.
Shapeless Crafting Edit
Here are all the recipes using Rye: