“I play the guitar” and “I play guitar” are both correct. These sentences mean that I can play the musical instrument in general, or that I play guitar music in general. The second one sounds a little more informal, but both sound natural.
“I play a guitar” doesn’t sound natural. This sentence suggests that I play one specific guitar instrument. A native listener might be a little confused and think, “Which guitar?” But your overall meaning would still be understandable, so it’s a very small mistake.