Depending on what type of mission it is, if its a "take this to X" type mission then it will be already in your cargo hold. If its a "we need this, go and get it" then you have to find somewhere that sells it, buy it and bring it back.
Be aware that carry missions can be a nightmare if you are in a ship that needs a large docking bay and the destination is an outpost (always check destination). You cant sell the cargo so you cant buy a different ship so If this is the case you have to abandon it and take the hit. Fetch mission cargo needs to be dropped of in one go, they wont accept it in small deposits so you need to make sure you can carry what they are after or buy a ship that can.