Ed Sheeran started as an independent artist performing live in any place in London that would let him (talk to anyone in London who was in the industry at the time, and they've got 'an Ed story' for you).
He marketed his music himself using music websites, and then his audience passed the music around between their mates through illegal file sharing.
When his album debut album + came out, he'd already built up a decent following through relentless live performances and his audience sharing his music. Although the file sharing was illegal, the audience stayed.
He goes on to say though that piracy is not really a big thing now, when it's so easy to stream music legally. Sheeran's statement is backed up by stats from IFPI who say that piracy is pretty much on the way out.