If you've read a lot about the Beatles, you've heard the different accounts. In a nutshell, the senior Lennon vanished from John's life when the future Beatle was age 5.
There was a dispute between Alf and John's mother Julia over his custody. It's tangled, but John was living with Julia's sister, Mimi, at the time. Alf made an attempt to take custody and Julia turned up to stop him.
John went back to living with Mimi and didn't see his dad again until he turned up in London looking for him. Alf, a former merchant seaman, was working in a hotel kitchen at the time and a co-worker pointed out he had the same surname, and looked like, one of the Beatles.
Alf either exploited this link, or it was exploited for him (probably a bit of both) and he ended up selling his account to the tabloids and making the 45 rpm single featured below.
John and Alf had a tense relationship that gradually settled, for the most part, into civility as the 1960s went on. John also provided his dad with a regular allowance, which helped prevent him from talking too much to the press, or doing more things like this: