Two beings by the names of Master Order and Lord Chaos created the In-Betweener because they couldn't find balance with each other. It was kind of like when a couple who doesn't get along have a kid and it ends up saving their marriage because they have something to focus on besides their horrible relationship. The In-betweener's job was to always create balance in the world. That's a dangerous word though. Thanos was also looking for balance and look how that turned out.
The In-Betweener had the idea to gain balance by altering reality to his concept of balance, but Doctor Strange had a problem with that. After all, Doctor Strange's job is to keep reality composed. Doctor Strange ended up beating the In-betweener, but then he got himself into more trouble later, as all cosmic beings do.