RTOS stands for Real Time Operating System. So, It is an OS on its own. This basically means that it can perform certain key operations such as time sharing, locking, synchronizing etc. Not all RTOS's have all these features. They basically have header files implementing such concepts - like locking a port that is used as dual purpose(Input & Output) or like spawning multiple threads and allocating time for each based on priority etc.
They may also include various libraries which help in implementing some interfaces like i2c....