SDL is a library which hides the graphics API behind a more convenient abstraction layer.
When you want to draw a sprite using the SDL library, you would call the function SDL_BlitSurface(sprite, srcRect, screen, dstrect);.
This function will then internally call the respective function of the graphics API to accomplish this. Which function of which API? That depends on the platform you are compiling your game for. When you compile for Windows, it will use Direct3D. When you compile for Linux, it will use OpenGL.
The purpose of using a library like SDL is that you no longer need to care about what graphics API is used by your game, which target platforms support which APIs and what the unique peculiarities of those APIs are. SDL hides all this behind one unified API.