It is operating system specific (or hardware specific if you are coding some kernel-like software on the bare metal like an OS kernel -see osdev.org-, in freestanding C). Stricto sensu you probably cannot write a game in purely standard hosted C99 (without using any external library, except the C standard library using only the few functions standardized in C99): you need to use some operating system service.
I'm focusing on Linux in my answer below.
If you are coding on Linux (in hosted C, as all user programs are), you'll code your event loop around a multiplexing syscall like poll(2) (or perhaps the older select(2), which I usually don't recommend; see also epoll(7)). Read about the C10K problem. You might use some event loop library like libev or libevent.
If you are unfamiliar with most Linux syscalls (listed in syscalls(2)...), read Advanced Linux Programming.
Reading and polling the terminal is tricky on Linux (because tty-s are quite complex). You probably want to use some library, like ncurses, to make a terminal application.
If you want to code a GUI application, you'll practically use some toolkit framework like Qt or Gtk (or libsdl). They provide an event loop, and you'll need to register callbacks (read also about continuations, it is a relevant concept).
If you want to have two programs (written by you) communicating, you'll need to use some IPC machinery, notably pipe(7)-s. You'll probably need some event loop in some (or both) of them.
For time-related issues, poll(2) (so all event loop libraries built above it) is given a delay. See also time(7).
I don't recommend using signal(7)-s in your case (signals are an interrupt like abstraction provided by the OS, notably POSIX ones). If you do, be very careful, it is tricky. A signal handler is only allowed to call very few async-signal-safe functions, and the usual way is often to simply set some
volatile sig_atomic_t flag in it, to be tested and reset inside your event loop. See also POSIX signal concepts chapter.
If you are coding on a non-POSIX operating system like Windows, you need to learn how to write event loops on it, and what is the low-level system API. You'll probably find some library for that. There exist a few libraries (e.g. Qt & POCO - both for and in C++) which are cross-platform. Windows programming is very different from POSIX programming, I know nothing about it.