'fine' can have two meanings depending on the context. It can mean either 'good/okay', or 'narrow/thin'. (As an adjective -- it also has other meanings as a noun or verb).
'marks' can have two meanings depending on the context. It can mean 'score/grade', or 'scratch/scrape'.
Interestingly, this phrase could in fact mean two things.
'He passed the exam with fine marks' = He scored a good/okay grade on the test
'He scratched the table with fine marks' = He (e.g. using a knife) made cuts on the table