Xingang (the main port for Beijing) is almost 90 miles away. I strongly suggest that you arrange transportation or through a private tour company.
A taxi is not a really viable option and the port area is not a simple layout. There is a train station and people "talk" about using it but it's a pain in the rear and the vast majority of people who tried to use it ended up either staying in Xingang or trying to find a private driver.
I used TravelChinaguide and had a very good experience. There are other operators and cruise line tours available.
If you do decide to go on your own, obtain your passport from the ship before you depart. You will need it to check into a hotel or exchange money. I suggest using bank ATM machines. They are far easier, most have an "English" option and no need to show a passport to obtain currency.
The main thing to remember is "If you go on your own, you are on your own if you don't make it back to the ship."