"war dialing" was using a computer to repeatedly dial random passcodes on a PBX or similar system to try to make free calls. A commodore 64 was used quite a bit for this, dialing all night long you'd wake up to about 5 or 6 valid codes that you could then use for about a week to dial BBSs all over the planet for free.
There were plenty of other ways to get free phone calls. It was a really interesting part of the 'underground' of computing back in the day.