You can add other players as friends to your Friends List. Your friend will receive a notification that you wish to add them as a friend and will have the option to accept or decline your request.
To open your Friends List, press the icon on your UI (top right) or use the Hot-Key "O", hit the plus button at the bottom of the tab, and type in the character name you'd like to add.
You may also right-click on the name of the character in chat, and select the "Invite Friend" button.
The Friends List, in addition to the guild menu, is the only way to see when a character was last online. You can only see that information if the other player accepted your friend-invitation.
After the player accepts your friend request, you will be able to see if they are online and you will also be notified when they log in or out. By default, this will appear in the General Chat written in yellow as a system text. This system notification can be added to any of the chat tabs. The same rule applies to your guild-mates. However, you can't find your friend's exact position unless you are both in the same Party and the same map. You may ask your friend for their location using the whisper feature.
The friend list has a limit of 150 players.