By default, the execution order of threads is determined by the operating system's thread scheduler. However, synchronization mechanisms, such as mutexes and condition variables, can be used to enforce specific execution orders.