As the holiday season has just passed I know there is a lot of new players. I have encountered quite a few myself. Thought I would give a few pointers on approaching another ship.
Do not come in full speed. Start slowing down from a distance.
Do not approach with your cannons broadside to another ship. Come in towards the front or rear of the other ship. You can come in towards the side of a ship but beware they can shoot as soon as you get in range.
Most seasoned players recognize you mean no harm if you raise the cannons on your ship straight in the air.
Communicate with the other ship. Use your chat wheel or you can keybind text chat by going to Settings>controller>text chat and choosing what key to bind it too, then you can type with your controller.
Do not have any weapons drawn.
Never jump off your ship and board the other ship.
Putting up your alliance flag can also help.
Understand this is a pirate game and some people will attack you no matter what you do. However these are some of the things that can help to make an encounter possibly go well. All the things I have mentioned that you should not do will get you sunk if you ignore them. I have sunk some people that may have been new but approached in what is considered a threatening manner. Hope this helps out any new players and any vets with other suggestions please add them on to the post.