What is the best way to create a function that takes an undeermined amount of arguments?

I remember reading about using an elipsis (...) I think, and I've seen functions, for example, in SDL where it takes more than one using "|" ( SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) ) . How does that work anyway?