These days computing is practically synonymous with Internet access, and often in any given location you may have access to more than one network, be it Wi-Fi, Ethernet, or otherwise.
With multiple connections available it may be beneficial to prioritize the way OS X accesses these networks to ensure you use the desired one. For example, if you have a relatively slow Wi-Fi network in a workplace but also have a faster Ethernet network that can be used, when connected to the Ethernet port it would be nice to ensure OS X uses this connection instead of using Wi-Fi.
While you can turn off Wi-Fi to force the system to use the Ethernet port as the only available connection, you can do this dynamically by prioritizing your network ports.
If you open the Network system preferences, you will see a list of the configured network ports, which will either be green if currently active, orange for available but not connected, and red for a physical disconnection. When two ports are simultaneously connected, then the top-most one will be the primary connection and as such will handle all network traffic by default.
To change the priority of your network ports, choose Set Service Order from the gear menu in the port list, and a small drop-down window will appear that shows the port order for the current network location configuration. You can select a configuration and then drag the services in the desired order to prioritize their connections.
This approach will set the priority for physical connections, but for some services like Wi-Fi there are additional prioritizations you can implement. The prevalence of Wi-Fi hot spots may result in several that you might use in a given area, and some Wi-Fi connections may be more secured or better trusted than others, so you might prefer to connect to those.
To adjust which hot spots you would prefer the system to use, in the Network system preferences select your Wi-Fi connection and then click the Advanced section. In the window that appears, choose the Wi-Fi tab, in which you can organize the Wi-Fi connections to which you have previously connected. By dragging them you can set their order, or you can remove those you do not wish to use for automatic connections.
A final option for prioritizing network connections is in the DNS settings for each established connection. DNS is like the phone book for the Internet, and having a robust DNS connection can make network connections a bit more snappy. In addition, some DNS servers on networks provide additional services like software license management and domain management details, so prioritizing their use might be preferred.
To set up your DNS servers, in the Advanced settings for a specific Internet connection, click the DNS tab to show your available DNS servers. If the servers are grayed out then these are automatically obtained from your router or ISP, and you will not be able to prioritize them; however, if you have manually set DNS servers, then you can click and drag them to set the order in which they are accessed. Do keep in mind that even if you add custom DNS servers, those obtained from your ISP will still be used by the system, but the system will only use them if your manually configured ones do not respond.