I am new to Terraria, and I want to play with my friend. But for some reason, it says 'connecting' for a very long time. I have his IP, and his port, but it will not work.
Make sure your friend has forwarded the ports that Terraria servers require. There's a short guide on how to do it here.
Beyond that, you will need to provide more information on errors or your friend's setup before we can determine what could be causing your connection troubles.
I think it's much easier to use Hamachi.
Both players will need to download Hamachi
The Hamachi website has gotten a bit confusing these day because they try to trick you into downloading LogMeIn. Hamachi is sort of a legacy product they keep around.
Why is this better than using your actual IP address?