FIFA Club World Cup is the competition that organized by FIFA annually, at first, it has been host by Brazil in 2000 in the first edition. Six continental winners, host, and the latest Intercontinental Cup winner has been invited.
Before that, the main competition is the Intercontinental Cup, the match(es - until 1979) between the European winners versus the South American winners. The last edition of the IC is 2004 as the European winners in that year, FC Porto, won the match.
For the revised edition as the new CWC, after the absorption by FIFA, all of the continental winners (total six) will be invited. The European winners and the South American winners will be automatically seeded to the semifinals, leaving the rest to play for the place in their rounds.
At first two revised editions (2005 and 2006), only the continental winners have been invited. The host nation highest league winners has been invited to the tournament since 2007 edition and so on.
For the further tournament details, maybe this can help you.
For the question about relation, the answer is no. Except that both tournaments have been organized by FIFA, and the winner of the tournament gets the special titleholder badge to be shown on their jersey until the new winners has been decided.