Once you're on the job market, it's usually too late to build a network. Of course, you should still make every effort, but networking from a position of need makes it harder to make real connections.
If you're already unemployed and looking, anyone you meet will see what they can do for you, but they won't know why knowing you benefits them. That's understandable, since at that point your only goal in building a network would be to help yourself.
In reality, it's best to make networking part of what you do at all times. When you have a job, it's OK to network with an eye on the next one. In fact, it's easier to set up your next position when the people you will be connecting with hear about your long-term interest rather than an immediate need.
What should you do?
Even if you have a steady, stable job you like, it's important to have an eye on tomorrow. That does not mean you're angling to leave, or are even particularly open to a new position -- it just means you're banking relationship capital for a future day.
This could be a somewhat passive activity where you simply make an effort to attend industry events and meet more people. The best bet, however, is to use the fact that you don't need anything from potential connections to build some new relationships.
One great way to do that is to seek out people at companies where you might want to work or in jobs you may want to hold. Introduce yourself, explain your situation, and ask for an informational interview or even to have a cup of coffee.
This tactic also works well if you're considering a potential geography switch. When planning a visit or vacation to an area you may someday want to live in, make a few appointments with potential employers. Let them know your future plans and any connections you may have to the area (family, property ownership, etc.). That way, if a job comes up, you won't be treated as an out-of-town applicant.
Networking can take on a lot of forms. You may consider volunteering or working with industry groups on projects that are outside the realm of normal business. Even something like joining a softball team increases the number of people you know.
It's also a good idea to raise your profile outside your own company. That could mean speaking at industry events, contributing to trade journals, or participating in after-work events.
Keep it going
The hardest part of networking on a long-term basis is keeping up connections. That person who had coffee with you two years ago probably won't think of you when a job comes open if that was your only contact.
Keeping in touch has gotten easier in the social media era. Make connections on all the leading platforms as appropriate, and interact with your network. Make a point of having a personal interaction a few times a year -- anything from getting together to sending a holiday card.
Put the effort in to keep your connections from going cold. If you do that then your network will be there either when you need a job, and may even surprise you by putting an opportunity on your plate when you did not expect it.