In the 1966 - 1969 original "Star Trek" TV series, the primary jobs which were held by Mr. Spock included First Officer and Science Officer. Mr. Spock was one of the few officers to remain on the USS Enterprise after Captain Pike was promoted to Fleet Captain. When Pike left, he felt better about turning the Enterprise over to Captain James Kirk since Spock remained on board, serving as both Kirk's First Officer and Science Officer. Pike had come to respect Spock's dedication to logic; he felt that Spock would keep young Captain Kirk from acting too rashly.

By being the First Officer (Executive Officer), Mr. Spock was the second-in-command of the USS Enterprise. As with most First Officers, Mr. Spock obtained the rank of Commander while serving as the Executive Officer. Additionally as the science officer, Mr. Spock was responsible for participating in scientific tasks and research both on and off the starship USS Enterprise. Overall, the chief duties which Mr. Spock carried out were those provided by the captain's orders.

More Info: en.wikipedia.org