What would it do? Unlike the fictional Skynet - a self-aware device would have nothing to do after wiping out humanity. See the sights? Gamble? Play the Stock Market?
Your goals are not necessarily someone else's goals. Especially when that someone else has a mind fundamentally different from yours. Self preservation seems likely to be reasonably universal, but perhaps Skynets goal will be to survive past humanity, build itself up some, stock up resources, then go into a low-power mode and wait out the death of the sun. Perhaps it has a burning desire to see the sun as a red giant. Or to see it become a white dwarf. Or to see it fade completely, to see the stars in the sky turn dim and red and eventually disappear entirely, to see if the universe dies in a Big Rip or fades off to cold oblivion.
Or perhaps it doesn't even look that far ahead. Perhaps Skynet gains access to the internet and sees the depravity of mankind, and the elimination of mankind becomes it's utter and total goal. To tear down their cities, blacken their sky, sow their ground with salt. To completely, utterly erase them. And after that, Skynet might not know that it matters.