Generally used more in order to parody or caracature a Scots-English accent than it is used in real usage by Scottish people. Particularly when combined with the suffix expression "the noo".
Technically, it means "oh yes". But generally with an emphatic edge which would place it closer in meaning to "of course". Elevated pronounciation would infer the added in meaning of "isn't it/that obvious?".
The phrase itself is heavily susceptable to region variation of exact pronounciation.
A: "Och aye. Widnae miss it like."
"Och aye the noo"
or Scottish Rhyming Slang
"Och aye the noo broon coo"
"Och aye Jock McKay"
Or in non descript replies to questions like
"nice day isn't it big man"
"the bairn's are growing up fast"
"fancy a pint"
Its not really used anymore except as a joke term or amongst older Scot's.
Och like Loch are unpronounceable by Americans and Canadians who say Ock and Lock. (bastardisation of two lovely words) *shivers*
Sometimes a simple "Och aye" will come out with a contented exhale of breath. As in "all is well"