We do not know with any certainty, but there are several theories. In his 1996 book 300 Years of Joseph Olin and His Descendants, Warren Olin devoted several chapters to the question.
Perhaps the most widely held view is that John Olin was pressed on board a man-of-war off the coast of Wales and then jumped ship in America. This story includes many variations. For instance, some take it to mean that he was from Wales, while others suggest that Wales was simply where he happened to be when he was abducted. Some have him changing his name from Llewellyn, presumably descended from the 13th-century Welsh prince of that name, while others view Olin as his original and only name. During his research, Warren found little evidence to support a theory of Welsh origin.
Other potential points of origin discussed in the book include France, where several variations of the Olin name are well-recognized, and Scandinavia, where the Olin name is common.
While writing his book, Warren found another intriguing possibility. It had long been maintained that there were no Olins in England at the time that John Olin was first making his appearance in America. One of Warren's contacts in England discovered dozens of Olins living just north of London before 1700. That was an area where the Spencer family was known to reside. (John Olin married Susannah Spencer.) Interestingly, those Olin names included spelling variations that matched those found in France. Warren now theorizes that the Olin name originated in France, from where it migrated to England, Scandinavia, and elsewhere, before ultimately arriving in America.
However, the bottom line remains that we still do not know where John Olin originated.