Puerto Rico is one of the enduring classics of the Euro-game genre, no doubt partially due to rich variety of options and depth of gameplay. Many complex strategic calculations can be made when playing a game of Puerto Rico, but if you're just starting out, here are some basic strategy tips:
Early money is crucial.
While most players will have a reasonable increasing income as the game progresses, money is very tight for the first few turns. For this reason, even getting a single gold doubloon with the prospector can be a worthwhile action. Early money can quickly translate to early buildings.
Get some production running ASAP.
Until you have production, Craftsman actions are useless to you. You want to at least be producing something, so when someone else picks craftsman, you are getting some benefit.
Remember that buildings need people to work, so get people in your buildings then and start earning money to build more buildings. The start of the game is often slow, so anyone who can start fast will have an advantage.
Make your decisions based on comparative rather than absolute advantage.
This means rather than choosing a role to give yourself and everyone else in the game 5 coins, it is generally better to give yourself 2 coins and everyone else nothing.
While it may seem counter-intuitive to not take the role that gives you the biggest benefit, you don't necessarily want the role that gives you the biggest absolute boon. You want the role that gives you the biggest gap in benefit between you and the other players.
Try to figure out what role other players might choose.
If you can understand what roles are likely to be picked, you can put yourself in a position to take advantage of them. This comes partially from familiarity with the game, but partially from observing the boards of the other players.
If someone has a really good empty building, they may choose Mayor to activate it. If you can build a good building before their turn, when they pick Mayor it will help you too.
Don't let a role leave you behind.
You want to make sure that whenever another player picks a role that isn't prospector, you can benefit from it.
If the other players in your game are heavily relying on shipping, lots of crafting and shipping will happen, so you'd better be producing barrels so you can get points too. Conversely, if nobody else in your game is shipping, you'd likely have to do a lot of the work yourself and pick craftsman a lot, often a bad idea.
Make other people do your work for you.
Generally speaking, when you need something, all you need is the role, not the privilege. If you need one colonist to activate your Factory, it doesn't matter whether you pick mayor or the player before you does. But if you let them pick it, you get to use your turn to do something else you want.
Secure a trade monopoly if possible.
Being the only player with a certain type of barrel gives you a number of advantages. For example, if you are the only coffee producer, it guarantees you ability to use the trading hut for big bucks if any spaces remain. If you are the only sugar producer, you can also put sugar on a ship during a captain phase to essentially make it your "personal ship" until someone else starts producing sugar.
Watch for the endgame.
The game will end when someone has all twelve building spaces filled, or whenever the colonists or victory points run out. Usually at least one player has not finished getting their engine running before the game ends; don't let it be you. If you see the game could end soon, start scrambling for victory points.
Remember that whoever has the most victory points at the end of the game wins, so even in the mid-game don't focus entirely on money while forgetting about points.