You can do it.. but we do not recommend the use of a computer to do a task that a cheap router can handle better..
But what you need is a second wifi card. In a Mac there are a number of ways to achieve that.. without card slots .. USB wireless sticks that are Mac compatible is one way.
You set up the computer with ICS (internet connection sharing) just look it up.
You receive signal on whichever network you have .. Ethernet being hugely superior of course.. and then the computer can act as router/bridge to duplicate that connection via any other network connection it has.. on a Mac with thunderbolt.. you could use a second ethernet via adapter.. or wifi with USB stick etc.
However.. a cheap second hand Apple router will work far better doing the same wireless extend.. without requiring your computer to be on 24/7 for any other client to use.