Literally a cassette deck to an extent. Back in the day, you would buy phone cards and insert them into the front-loading slot. The display would track how many minutes you had left. It was so ubiquitous in the 1980s & 90s that you would get phone cards that had custom designs and your favorite J-Pop idols on them.
Japanese pay phone accept phone cards to this day.
This one is from Akiba.