The most likely scenario is that Oswald was a frickin' Communist that hated JFK and wanted him dead... and made it happen.
The video footage clearly shows the exit wound was in the front of Kennedy's head, which means the killing shot came from behind--end of story.