O has three different ways that it can be pronounced.

I've been taught the following:

"Oh"- if it is stressed
"Ah" - at the beginning of the word, or if it immediately preceeds the stressed syllable, such as in the word окно
"Uh" - everywhere else.

Two great words that help with practicing the different sounds are:

молоко - (muh-lah-kOH)
хорошо - (hu-ra-shOH)

Those are not the ways you spell the words phonetically, it's just to help read how to pronounce the words

Of course, there are other ways of pronouncing the letter O if it is influenced by й