Grammatically speaking what role does 'him' play in this sentence?
I like him working out.
Solution 1:
In terms of grammatical case, him is marked accusative. If you want to get into syntactic theory, then it is involved in something called Exceptional Case Marking.
This Wikipedia article is a bit confusing, even if you know what ECM is. Essentially, [him working out] is analysed as a clause, so the sentence is structured [I like [him working out]]. So, [him working out] forms a grammatical unit. The Exceptional Case Marking is the fact that him is getting accusative case as a result of the verb in the main clause, even though him is in the subordinate clause (this normally doesn't happen). So him is serving a dual role in this sentence, according to theory.