Portals in No Man’s Sky are used to quickly travel to distant systems and planets. They are very useful if you want to find something specific that another player has left for you (let’s say a system where a specific ship spawns). Finding portals is very easy. You will need to locate a Monolith which will accept some basic materials in order to let you use it.
To find a Monolith, simply go to the cartographer NPC on any space station and buy the purple planetary charts that will reveal those types of buildings.
You can buy those either with Nanites. If the NPC happens to sell those for Nanites, not all do. Or you can use Navigation Data and exchange for those charts. To get navigation data, you can easily find it scattered on space stations, in crates on your freighter (you can build more of those) or just buy from NPCs when they happen to sell them (maybe even galactic terminals).
You also need to have at least one of the specific relics for each race to input into the Monolith when you select the option to locate a portal for you. So for example, if you’re in a Gek system, make sure you have one Gek relic.
And finally, to learn portal glyphs, simply follow the questline and as you visit different star systems and go on space stations, every now and then there will be a different NPC (traveler) who will send you on a short quest to visit his grave and as a result, you’ll get one glyph unlocked. So it simply requires that you travel a lot and interact with these traveler NPCs.