The IBM 3151 is IBM's configurable ASCII terminal -- in its "vanilla" mode, it's just an ASCII "dumb" terminal. It can accept "personality" modules that allow it to appear as a DEC VT100 or IBM 3101-compatible terminal.
To connect: Connect the Macintosh, then use a communications application such as MacTerminal to capture the text to a disk file for later manipulation.