How does ninjutsu work

My friend and i started playing a lot of commander and decided to make some proxy decks since we don't have the money to actually make decks we want. I decided i wanted to try making a ninja deck and he's making samurais but I'm a little confused on how ninjutsu works. It says swap with an unblocked and go in attacking. Does this mean the unblocked ones damage doesn't go through since it gets pulled back and does this mean the other player has a chance to block the new attacker or does it automatically go through?