1. Kidding and joking can both mean to playfully tease someone else.
2. Joking can additionally mean that someone is simply telling jokes.
3. Kidding can also be used in such a way that the subject and object are the same. (To kid oneself)
1 - I'm just kidding. (Okay)
1 - I'm just joking. (Okay).
2 - He joked about his new job. (Okay)
2 - He kidded about his new job. (Not okay)
3 - He's kidding himself if he really thinks he will win. (Okay)
3 - He's joking himself if he really thinks he will win. (Not okay)