If you have a router which only allows Ethernet ports, can you use a converter to convert to fiber?
For example if I have a switch that is capable of fiber, would I be able to link this to the router via fiber if I had a converter?
Yes, you have several options. The easiest is likely to be purchase a 1000baseT SFP for your "fiber switch," which allows you to plug a gigabit copper connection into it. You probably already know there are various single-mode and multi-mode fiber SFP transceivers, and there are copper ones available as well. These are not guaranteed to work in every switch, so, check with your manufacturer or test it out in a lab.
There are also media converters which do what you describe; convert from one type of media (like copper 1000baseT) to another (like 1000baseLX fiber.) These devices come with plenty of gotchas (like port up/down state issues, masking errors, and other things that make malfunctions hard to troubleshoot), so don't use a media converter unless you don't have a better alternative.
Yes you can link it with router even though router is not compatible with fiber port and when switch is compatible with fiber port(SFP).
Solutions is use media converters at router end we have wide range of media converters available like 1000BASE-T Connect switch fiber assuming switch is having fiber port and connect same fiber other end to media converter other port of media converters with Ethernet cable towards router.
"Ethernet" ports can be twisted pair (TP) or fiber.
Assuming you mean the router has got TP ports only: there's a wide range of media converters out there, converting 1000BASE-T to e.g. 1000BASE-LX (for duplex single-mode fiber). Many media converters have no fixed fiber port but a modular SFP port that allows you to plug the exact PHY module you need. Make sure it matches the one that's used on the other end.
If the router/switch already has an SFP port you should use a fiber module in there as it avoids the separate hardware and gives you more control over the fiber port (improved link-loss signaling, possibly signal-strength monitoring).
You can also use a switch as "media converter". Make sure you separate the fiber traffic (WAN?) from your internal LAN by configuring VLANs appropriately. Also, you might want to deactivate STP and such to avoid disturbances of your internal network.