I couldn't be sure which one it is. I could be wrong but years ago, it could have been either of these. Don't quote me on this :
Years ago, I THINK, you could do various SEO tasks and begin to see good or bad results from what you did, so you could learn what worked and what didn't.
SEO tasks that you perform, take a long time to filter through, so it's a long waiting process to see what worked and even if it did the 1st time around, things change.
Nobody really knows what they are doing to be honest. Link building and content are the only real sure thing I personally think are a constant factor and it's building lots of links and creating fresh and regular content, so that in itself is a lot of hard work.
SEO techniques and the ranking factors are a mystery to all but google and they change so much you can't keep ahead, but you have to try and keep afloat. You could get to page 1 and be happy, but the next week drop out into non-existence.
What works. Who knows.
Directory submissions. Who knows.
Edu/Gov links. Who knows.
DoFollow/NoFollow. Who knows.
Blog Commenting. Who knows.
Link Wheels. Who knows.
Domain Age. Who knows.
The reason I say who knows is as above. It takes a while for things to filter through, so you need to do one thing at time to see what did work. A true SEO EXPERT will know from ACTUAL testing which of the above worked 100% Maybe that question should be asked. Again. It may have worked 6 months ago, but does it still work now...
I've gone from 500th position to 18th position in 6 months. I've just built, links and content. This is a for a keyword that has 44,000 exact results per month according to Adwords.
I've also seen sites, which in my personal opinion shouldn't rank well.
Science or Art. A bit of both but neither of each other.