Every month the company will have a schedule of trips made. Every company is different, but most airlines have the majority of their flights during hours people are awake. Cargo carriers can lean more towards night flying. Anyway…
All the pilots bid for the trips they want, and people get the trips they want based on their seniority level. If you’re JR and Senior pilots want the same trip as you, they will get it and you will get something else.
SkyWest has a decent number of trips called Split-Duties or Standups. An example would be at 9pm you fly Chicago to Detroit, Sleep at a hotel for 5-8hrs and then fly Detroit - Chicago and are home by 9am. These trips pay 6-8hrs, but you only fly 2-4hrs and are home every day. You cannot hold these trips all month long until you are decently senior (50% or better usually).