Q:

how to show contact inputField in popup window

page
<apex:page controller="democlass">
    <apex:form>
        <style type="text/css">
            .custPopup {
                background-color: white;
                border-width: 2px;
                border-style: solid;
                z-index: 9999;
                left: 50%;
                padding: 10px;
                position: absolute;
                width: 500px;
                margin-left: -250px;
                top: 100px;
            }

            .popupBackground {
                background-color: black;
                opacity: 0.20;
                filter: alpha(opacity=20);
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                z-index: 9998;
            }
        </style>
        <apex:pageBlock>
            <apex:pageMessages/>
            <apex:pageBlockSection columns="2">
                <apex:inputText value="{!searchBoxstring}" label="Search" />
                <apex:commandButton value="Search" action="{!searchbox}">

                    <apex:commandButton value="Add New" action="{!showPopup}" rerender="tstpopup" />
                    <apex:outputPanel id="tstpopup">
                        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}" />
                        <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
                            dgff
                            <br/><br/><br/>

                            <apex:commandButton value="Save" action="{!save}" rerender="tstpopup" />
                            <apex:commandButton value="Cancel" action="{!closePopup}" rerender="tstpopup" />
                        </apex:outputPanel>
                    </apex:outputPanel>
                </apex:commandButton>

                <apex:pageblockTable value="{!result}" var="wl">
                    <apex:column title="Name">
                        <apex:outputLink value="/{!wl.id}" target="_blank">{!wl.name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!wl.account.name}" />
                    <apex:column value="{!wl.id}" />
                </apex:pageblockTable>
                <br/><br/>
                <apex:outputText>Total Record : {!counter} </apex:outputText>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

class
public class democlass {
    public string searchboxstring {get;set;}
    public list < contact > result {get;set;}
    public Integer counter {get;set;}
    public boolean displayPopup {get;set;}
    public void closePopup() {
        displayPopup = false;
    }
    public void showPopup() {
        displayPopup = true;
    }
    public democlass() {
        result = new List < Contact > ();
    }
    public void searchbox() {
        result = new List < Contact > ();
        if (searchBoxstring.trim() != null && searchBoxstring.trim() != '') {
            result = [select Name, account.name from Contact where account.Name =: searchboxstring];
            counter = result.size();

        } else {
            Apexpages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Please Enter Account Name'));
        }
    }
    public void save() {
        insert result;
        displayPopup = false;
    }
}

A:

You have to create a new Contact in your showPopup() action. In vf page you can display the <apex:inputField wrapping inside <apex:pageBlockTable. Upon saving it will save the new Contact in Salesforce. 
VF Page
<apex:page controller="democlass">  
    <apex:form >
        <style type="text/css">
            .custPopup{
                background-color: white;
                border-width: 2px;
                border-style: solid;
                z-index: 9999;
                left: 50%;
                padding:10px;
                position: absolute;
                width: 500px;
                margin-left: -250px;
                top:100px;
            }
            .popupBackground{
                background-color:black;
                opacity: 0.20;
                filter: alpha(opacity = 20);
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                z-index: 9998;
            }

        </style>
        <apex:pageBlock >
            <apex:pageMessages/>
            <apex:pageBlockSection columns="2">
                <apex:inputText value="{!searchBoxstring}" label="Search"/>
                <apex:commandButton value="Search" action="{!searchbox}" >
                    <apex:commandButton value="Add New" action="{!showPopup}" rerender="tstpopup" />
                    <apex:outputPanel id="tstpopup">
                        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
                        <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
                            <apex:pageBlockTable id="thetable" title="Contacts" var="con" value="{!result}">
                                <apex:column headerValue="First Name" >
                                    <apex:inputField value="{!con.FirstName}"/>
                                </apex:column>
                                <apex:column headerValue="Last Name" >
                                    <apex:inputField value="{!con.LastName}"/>
                                </apex:column>
                            </apex:pageBlockTable>
                            <apex:commandButton value="Save" action="{!save}" rerender="tstpopup"/>
                            <apex:commandButton value="Cancel" action="{!closePopup}" rerender="tstpopup"/>
                        </apex:outputPanel>
                    </apex:outputPanel>
                </apex:commandButton>

                <apex:pageblockTable value="{!result}" var="wl">
                    <apex:column title="Name">
                        <apex:outputLink value="/{!wl.id}" target="_blank">{!wl.name}</apex:outputLink>
                    </apex:column>
                    <apex:column value="{!wl.account.name}"/>
                    <apex:column value="{!wl.id}"/>
                </apex:pageblockTable>
                <br/><br/>
                <apex:outputText>Total Record : {!counter} </apex:outputText>   
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Controller
public class democlass {
    public string searchboxstring{get; set;}
    public list<contact> result {get; set;}
    public Integer counter{get;set;}

    public boolean displayPopup {get; set;}     

    public void closePopup() {        
        displayPopup = false;    
    }     
    public void showPopup() { 
        result=new List<Contact>();
        result.add(new Contact());
        displayPopup = true;    
    }

    public democlass(){
        result=new List<Contact>();  
    }
    public void searchbox(){
        result=new List<Contact>();
        if(searchBoxstring.trim() != null && searchBoxstring.trim() != ''){
            result=[select Name, account.name from Contact where account.Name =:searchboxstring];
            counter = result.size();
        }
        else{
            Apexpages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Please Enter Account Name'));
        }
    }
    public void save(){
        insert result;
        displayPopup = false;
    }
}

Screen

