A device driver is a special code that interfaces a physical device into the system and exports it to the user-space processes using a well-defined API. In a UNIX-like OS, where everything is a file, the physical device is represented as a file. Then, the device driver implements all the system calls a process can do on a file.
The difference between a normal C function and a system call is just the fact that the latter is mainly executed into the kernel while a function executes into the user space only. For example,
printf() is a function while
write() is a system call. The latter (except for the prologue and epilogue part of a C function) executes into the kernel space, while the former executes into the user space ...