The Z80 can input/output a byte from/to any of 256 ports, which is useful for sending and receiving data from other parts of the system. On the SMS, these are the relevant ports - note that almost all of them are mirrored in other places but it gets confusing if you use the mirrors so I won’t go into it.
|$3f||I/O port control|
The main ones you will use with are highlighted in bold. To get a program running, you only really need the VDP ones.