If you have a wifi router and several machines, you can connect the printer to the router via wifi and the other machines connected to the same LAN (same subnet will be easier) via ethernet cable will be able to use the printer.
If you have a network with no wifi and the printer can only connect via wifi (very unusual), you won't be able to connect to it.
If your router has no wifi and you have a machine with wifi, you can connect the printer to this machine and share it from there but this is not the best way as your machine will need to be always on (and working).
If you have a router with an USB port and no wifi, almost certainly, the printer will have an USB port and you can use it to connect to the router and share it to the network.
If you have only one machine, you can use wifi if available on your machine but almost certainly your printer will have an USB connection available too.