How do contracts with civilians work? I let out contracts for automated mines, but they never got filled.
You need to set up a supply contract at a colony that posseses the items you want moved and a matching demand contract at the colony you want the items moved to. Civilian freighters will then consider the contracts when they decide what to move on their next trip. Note contracts will only move existing items, so an infrastructure contract will only move existing infrastructure not the infrastructure that is generated by trade.
What is the function of commercial space ports?
They reduce the time it takes to load/unload cargo/colonists/troops. One facility halves the time taken, two reduces it to a third, three to a quarter and so on.
Is there anyway to control which colony the civilians take colonists to? I have one colony with over a million job openings, and another that has 1.4 million people with nothing to do.
If a colony has at least 25 million inhabitants, you can alter it to be a source of colonists; stable, meaning no colonists arrive or leave, or a destination so colonists can be sent there. If it is under 25 million it will be automatically kept as a destination. If there are multiple viable destinations, there is no way as far as I know to force the civilian shipping lines to pick one over another.
edit: Note that a colony with insufficient infrastructure to support a shipful of additional colonists is not considered a viable target, so one way of possibly influencing it is to use your own freighters to move infrastructure around so only one colony has space. This will be difficult as civilian freighters will likely be continually dropping off civilian constructed infrastructure on the colony you are trying to avoid growing.
What can I do with subjugated species? I have 126 million aliens with nothing to do. Can I safely use them as colonists? I would eventually like to integrate them into the Terran Empire.
Yes, you can freely use them as colonists, though note that their colony costs will be based on their own species tollerances so the may want significantly different enviroments.