Strat by reading up on threading: it's not as simple as it appears.
Here's a few links to get you going:
https://dev.to/quantumsheep/basics-of-multithreading-in-c-4pam[
^]
Multithreading in C - GeeksforGeeks[
^] - those are C language specific and may not work in your specific OS.And they don't touch much on the problems you can get: locking, deadlock, and the planning that needs to go into creating a multithreaded app , particularly in an elderly language like C which probably means a console app (so user input will lock the calling thread completely so it ignores "signals" from the "processing thread" for example).
For that, start here:
How to Resolve Multi-Threading Problems in Concurrent C Applications[
^] but you will probably need to find other sources as well!