First of all to fly a YT-1300 you need to be a Neutral Master Pilot.
To invite people on your ship they need to be grouped with you. Then they need to stand close to you when you use the ship terminal at the starport. Instead of just pressing launch ship, there should be a group or invite button, I forget what it is called. This will bring up a menu where you can invite people on your ship. You can also kick them off if you want.
I heard that you can also invite people who are not in your group but I don't know how that is done.