History as stated by 4x:
When John and Yoko began living together in 1968, divorce proceedings began between John and his wife Cynthia. Paul McCartney, who was very close to John and Cynthia's son, Julian, was concerned over John's marriage breaking up, and in support of Cynthia and Julian, wrote this song. Originally titled "Hey Julian," it later developed to "Hey Jules," then finally "Hey Jude," because it was thought Jude was a stronger sounding name.
The song is merely a message to Julian, then five years old, of encouragement while his parents went thru their separation and divorce. Although Julian at this young age knew what the song was about, he did not learn the facts first hand from Paul until 1987 when the two happened to run into each other at a New York hotel. This had been the first time in years that the two had an opportunity to sit down and talk with each other. Paul and Julian had a wonderful friendship and closeness as Julian grew up, and Julian recalled that there went lots of pictures of he and Paul, more so than there were on him with his father, John.
"Hey Jude" turned out to be the most successful song The Beatles ever released. It was recorded in two days at Trident Studios, London, on July 31 and August 1, 1968, using a 36-piece orchestra, and by the end of that year had sold more than five million copies.
Why was "Hey Jude" so important and popular? One of the reasons was at that time it was the longest song ever released as a single at seven minutes and eleven seconds. The other reason is that its lyrics were easy, and developed into a community type anthem with its sing-along chorus.
John Lennon added a four-letter word hidden deep in the song around the three-minute mark, and the intro in green below, was spoken by John and Paul. In a jestful manner, John spoke of the "black country," which was the name of the old smoke-stack industrial region in the middle of England, and Paul answered with his mention of "Boston place," which is a small London street where The Beatles' company Apple had just installed an electronics laboratory. In a more familiar scene, Boston street was that street in which The Beatles ran for the title sequence of their film A Hard Day's Night. This introduction can be here on the version included on The Beatles Anthology 3.