1. He can play the guitar.

2. He can play guitar.

(Which one is correct? Are both OK?)

Both are OK. They mean approximately the same thing.