I assume you have the minecraft server behind a router and your Internet Service Provider (ISP) assigns a dynamic IP to you.
In your router settings you have to enable port forwarding. That is, any data sent to port 25565 will have to be forwarded to your minecraft server's internal IP address.
At this point you can find out your external IP by Googling "Whats my IP" (no quotes). and tell your friends the IP address to use to login to the server. If the ISP changes the IP address, you will have to tell them again the new one.
If you subscribe to a dyndns host name, you can give your friends the host name and have the router update the dyndsn service when your external IP changes. See DynDNS updater?
None of this has anything to to with Ubuntu. Therefore this question is off topic here.
Hope this helps