Have you checked if the IP address is right? Watch this to check: https://www.youtube.com/watch?v=6wqxd5Eo0QA .
Watch until 1:40 in the video. In Minecraft, in the bar where you type your server IP, type ***.***.**.***:25565
The stars represent where you type your computer IP, make sure that you use the same "punctuation" as the above example when typing it in! If this doesn't work, ask your friend to check that 25565 is under "server-port" in their server properties. If you or your friend don't know how to do that, or if nothing above is working, tell your friend to make sure that they used this method to make their server: https://www.youtube.com/watch?v=Tzs2RFrK5fo .
If they didn't use the above method to make their server, ask them to make a new server with that method.
I hope this helps!