Registration by invitation only

I am wanting to create a social site that has registration by invitation only. How can this be done?