Are you ever confused by Matthew chapter 1? Check out this infographic showing the genealogy of Jesus, it should help clear things up.

See the full-size image here.