Your comparison to inject molding is correct. The press is used to hold the die mold halves together. I enjoyed this video that explained the process https://youtu.be/FUsicN-wKoY?t=234
The mould could have simple locking pins that lock it closed for the actual casting operation, and then unlock to remove the part.