To be more specific, Magneto is a free man as early as the 1980s, as can be seen in the prologue of X-Men: The Last Stand, which still takes place in the unaltered timeline. So somewhere between the original 1973 and the 1980s, he got out, which seems pretty remarkable for a man who was imprisoned for the murder of John F. Kennedy. So what happened? Some speculations can be made. Magneto may have escaped, as he would do later in X2. This would have necessitated him to live in hiding for years, as he would still have been a wanted man. Magneto does indeed have a secret base of operations in X-Men, but he also comes out in the open quite often. Perhaps his face has aged enough by then to prevent anyone from recognizing him (the general public doesn't know him anyway), but the authorities would be expected to still keep an eye on him. In that case, they would also know not to assault him with metal weapons (which happens in the first X-Men). So this may imply that Charles Xavier (Professor X) or some other mutants learned about Magneto's innocence later on, and made a successful effort to free him. According to producer Simon Kinberg, a backstory was written for Bolivar Trask, which specified that he was part of the group responsible for attempting to assassinate the mutant JFK. Trask had military supporters in the US Government that were part of this conspiracy. In the original timeline, Trask was killed by Mystique, so it is possible that Charles did research into Trask on his own, and found out the truth about the JFK assassination. He may have made a case for Magneto, even used his mental powers to convince the people in charge. Or he simply helped him escape if the authorities did not listen and subsequently helped him to hide, until the commotion had died down. In any case, Charles' knowledge of his innocence would also explain why Professor X and Magneto temporarily reconciled in the 1980s.