Let's say Oswald did it. WHY?
I wrote a little essay on that somewhere on FR a while back, giving my own estimation of his motive. The short version is, he was an inadequate person and he had a driving need to compensate for it. He had a deep psychological need to be important. He went through a series of events in his life to try to make himself so, including his defection to the Soviet Union and his adoption of communism. But none of it worked. His frustration combined with his violent tendencies prompted him to resort to shooting at important people, thinking that by such action he would make important changes in the world and therefore be important himself. He shot at General Walker, was prepared to shoot at Nixon, and then one day Kennedy drives right under his window.