Both allow you to access the router over the internet.
The difference is that Winbox is a specific GUI made by MikroTik, while API is intended for applications to consume it, and present it to you in some “custom” fashion of theirs. There are for example applications for phones that connect over the API protocol - it’s not Winbox, but it’s still a way to access and manage the router, and possibly even automate stuff.
I now observe when running the latest RoS beta [7.19] that under services MikroTik have installed API version of Winbox using the exact same port … so now 2 versions exist …