if your using libogc, libfat handles all this. You can just use fopen, fread file system commands. This is the quickest way to write any SD code on the Wii.
SD communication is done through IPC sending commands to the IOS (starlet) here is a list of commandshttps://www.wiibrew.org/wiki//dev/sdio/slot0
you don't really need to understand any of this though if you use libogc as its all layer upon layer that does it all for you.
here is my ocarina code, its very simple as you can seehttps://www.pastie.org/private/uagn7dhuywhhh4lzpqblq
if you need any further help let me know