Most, if not all of the ports that mIRC uses can be customised. There are a number of default ones however.
The default ports used by DCC (Sending and receiving files) is 1024-5000. People often change this due to the large range. This port can be changed in:
ALT+O > Connect > Options > [Advanced...].
Ports used to connect to a server are specified by you in the /server command. mIRC does not use these ports, the server will only be compatible with certain ports. The most common port to use, and the default one in mIRC is 6667. You might see the available ports by for a server when connected and typing
[/motd. The default connect port can be changed in:
ALT+O > Connect > OptionsIdentD uses port 113. It is not recommended that you change this. The default port for IdentD can be changed in:
ALT+O > Connect > Identd.
The DCC Server uses, by default, listens on port 59. This may be changed in:
ALT+O > DCC > Server.
If you have a Socks Firewall set up in mIRC then, by default, the port is 1080 and for most people who need this option it should be kept that way. However, should you need to change it, you can in:
ALT+O > Connect > Firewall. Do note that most people do NOT need to use the Firewall option, and doing so without knowing whatt you're doing will prevent you from connecting.
If you use a script of some description that uses Sockets then the socket will use a port. You specify the port when opening the socket. There is a simple tutorial on sockets
here, you will find more advanced ones on sites such as
mircscripts.org and
mirc.net. Also see
/help sockets.
Hope this has been informative

Regards,