The schools get to decide who they want to play, if it's a high profile game like Texas vs tOSU it will usually be a home and home. Or a school like Texas pays Sam Houston a large sum to come and play them, it's a win win for both schools. The larger school gets a blowout win that the scrubs get to play in and the smaller school gets hundreds of thousands of dollars PLUS part of the gate money.
I am sure each school has it's different process and reasons for scheduling who they schedule. Usually either to keep a rivalry going or to tap into that school's state's recruits