Valid contracts contain an offer, an acceptance, and consideration. In order to create a legally binding contract online, you write the contract, email it to a party, and the other party emails it back with an electronic signature indicating acceptance. There are no hard copies necessary.
Courts recognize electronic signatures as valid and binding.
Since signing an agreement with a regular ink signature is not possible online, there are several ways to indicate agreement. Perhaps the easiest is to have the signer's name typed into the signature area with a scanned and pasted version of the signer's signature. Other ways are to use an "I Accept" button (frequently used in online agreements for downloads) or by using cryptographic "scrambling" technology.
Any contract should be detailed, clear, and specific. This will lessen the likelihood of disputes later on. To ensure your contract covers all necessary areas, including exact compensation, time limits to fullfill terms of the agreement, how to handle any disputes that may arise later on, etc., it would be wise to have an attorney review the agreement in its entirety.