The first of your grain, wine and oil… (Deuteronomy 18:4)
Terumah gedolah, the “great gift,” was a portion separated from grain, wine and oil and given to the kohein. The Torah does not prescribe a size for this gift – even a single kernel would exempt an entire stack! Of course, the kohanim would starve to death if everyone gave that so the rabbis felt the need to set a standard size. The average person, who was neither overly generous or miserly, tended to give one-fiftieth of their crop, so they established this as the standard. An allegorical support for this is that the word “terumah” resembles “trei m’meah” – “two out of a hundred.” (Reduce the fraction – 2/100 is the same as 1/50.)
Terumah was given to male kohanim but they could feed their entire household – their wives (even if they married the daughters of non-kohanim), their household servants, even their domestic animals.
While we speak specifically of grain, wine and oil, terumah must actually be taken from any crop that grows from the land, is guarded and serves as food for people. Various seeds and berries might or might not be obligated in terumah depending on whether or not people eat them as food. (You may have eaten sunflower seeds or sesame seeds; you probably haven’t eaten radish seeds or onion seeds.)
The basis of this mitzvah is that grain, wine and oil are the things that nourish and sustain a person. It’s only appropriate that a person remember God, Who gave him these good things, by giving a portion to those whose job is to officiate in the Temple.
This law applies in Israel at a time when it is inhabited by Jews. This includes territories that were conquered and annexed by King David, such as Syria. Rabbinically, the law was extended to Babylonia (where the Jews were exiled) because of the frequent commerce between the two lands.
This mitzvah applies in Israel when the Jews live there. It is the topic of the Mishnaic tractate of Terumos and is codified in the Shulchan Aruch in Yoreh Deah 331. This mitzvah is #126 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos and #11 of the 26 mitzvos that can be performed in Israel according to the Steipler Gaon.