You can either use a bridged interface or NAT.
Using bridging, the virtual NIC of CentOS will act as if connected to your real network and switch. It'll get an IP from the same IP range as your macOS host and will be fully accessible from the mac host or any other device on LAN. On VM network settings, you'll choose the virtual adapter, attached to bridge and select physical adapter on your host (normally a list will be available). If you use DHCP on your LAN, dhcp should be set on VM also. If static, change to static on VM also.
Then type on host:
ssh [CentOS_user]@[CentOS_VM_IP]
Bridging using wireless interface on host is possible on recent versions of VBox, yet a bit limited. using ssh to VM should not be a problem.
Using NAT, your VM will be in a separate network, not immediately accessible from your MacOS host or other devices on your LAN. You need to forward port 22 (used by ssh) of your VM to a port on macOS host, for example 2222. On VM network settings, you'll choose the virtual adapter, attached to NAT and then click port forwarding
button below. There on the new window, you'll forward guest's port 22 to localhost's (127.0.0.1) to port 2222 or whichever high port is available. Inside the VM, the network setting must be DHCP. Afterwards you'll just type:
ssh -p 2222 [CentOS_user]@localhost
to connect.
You can follow Windows or Linux articles, the interface is almost the same on Virtualbox regardless of platform. Keep in mind the principles I mentioned above, they'll help you understand the guides.
I'm attaching a very comprehensive guide on VBox networking. It's on Windows host, you may have a more recent version of VBox, yet the principles apply. Virtualbox comprehensive networking guide