kun-yomi and on-yomi are the two types of Kanji readings. Each Kanji character has kun-yomi readings or on-yomi readings or both.
The kun-yomi (訓読み) is the original Japanese reading, while on-yomi (音読み) is the Chinese reading, which was adapted to Japanese since the introduction of Chinese characters (Kanji) in Japan in the 4th century.
For example: the Kanji character 水 (water) has two readings: mizu (みず) and sui (スイ).
みず is a Japanese reading (kun-yomi), whereas スイ is the on-yomi (from the Chinese "shui").
(
In dictionaries, when transcribed in kana, the kun-yomi is usually written in hiragana, and the on-yomi in katakana)
A Kanji character may have several kun-yomi, and several on-yomi, like 日 (day, sun).
There are also (fortunately rare) cases when the pronunciation of a word has nothing to do with the readings of its Kanji components. Examples: 今日 (きょう today), 相撲 (すもう
sumo).
I don't think there's an absolute rule for the use of readings. Though I think that, most of the time, when a Kanji is used alone it's read in kun-yomi.
Other than that, you just need to learn vocabulary and associate the reading to the spelling, while also learning each Kanji with its readings.