As someone else replied, contacts, friends and old colleagues. I got my first remote job by going to the local Ruby user group and getting to know people.
I found remote work through old work contracts. People that trust me to do a good job regardless of where I am. It is difficult for companies to give people that trust, so it is all about helping them to find that trust and then not letting then down.
You might also check https://weworkremotely.com/ (full disclosure, company I work for runs the site).