Everyone has answered this really well, but I'd like to add some points that I wish someone had told me when I began learning.
The On-yomi is taken from the original Chinese reading of the kanji, and the Kun-yomi is the Japanese reading that has "adopted" the kanji, so to speak. As a general rule, if the kanji is by itself, (as in, it is not attached to other kanji, just hiragana) it generally takes on the Kun-yomi; if the kanji is part of a compound, it (and the other half of the compound) takes on its On-yomi.
Should I bother learning the non-preferred reading?
The answer is "yes". It's the difference between guessing the meaning of a word and being able to read it out loud. That may not sound like much, but it's absolutely essential.
食べる is pronounced with its Kun-yomi,
事 on its own is generally pronounced
こと, which is the Kun-yomi. If if you combine them
食事, they're both read with their On-yomi:
Again, that's very generalized and not always the case, but it's the rule rather than the exception.