The spst switch(on top) is off/on and the spdt switch(middle) is for direction which uses relays and bottom two spst switches are for limit. Left switch goes off it it goes to far to left so current stops only for that direction so motor cannot go farther left and right switch goes off it it goes to far to the right and the current stops only for that direction so motor cannot move farther right.