のに indicates that what actually happens(i.e., what is expressed in the clause following のに) is contrary to the speaker's expectation or general belief, meaning "despite ~; although ~." The speaker's expectation, which is not expressed here, is based on the clause preceding のに.
The use of のに indicates that the speaker finds what happens surprising. のに is used within a sentence, while それなのに is used at the beginning of the second sentence to present an unexpected event/action which is contrary to the speaker's/people's expectation based on what has been expressed in the preceding sentence.
*For non-past affirmative na-adjectives and nouns, drop the だ ending of the plain form and put な: A(な)なのに, Nなのに.
弟はよく勉強しました。それなのに、せいせきが上がりませんでした。
My younger brother studied hard. In spite of that, his grades didn't go up.
今日は天気がいいのに、あの人はずっと家でねています。
Although it is a nice day today, s/he has been sleeping at home.
Lesson 21-2「雨が降っても、外出します。」
I'll go out even if it rains.