In order to change the direction of rotation of dc motor either the armature windings connection should be change or the field winding connections but not both. I don't get how the motor keeps on rotating in the same direction if we change the connection to both i.e the armature as well as the field winding?
Imagine two electromagnets on the table in front of you. You put one of the ends of each near the other. You set the polarity of currents thru them so that one of them makes N and the other S. They clink together. You flip both currents and now instead of N and S you get S and N. You still have two opposite polarities attracting. Clink.
Now if you only flip one of the currents, then you have either N-N or S-S. Just like it didn't matter whether you had N-S or S-N, this time the two magnets will push away. Flip both polarities again, and they still push away.
Motors work on the same principle. You flip the polarity of one of the rotor or stator, and the motor will go the other way. You flip both, and there is no difference. What used to be N in the rotor attacted to S in the stator is now S in the rotor but still attracted to N in the stator. Repulsion works the same way. What was S-S is now N-N, but either way they still push apart, which in this case means rotate in the same direction.