First, create a key pair to identify yourself:
This will ask for a user name and e-mail address, and the keys will be coupled to that e-mail address.
Now, export the public key so you can publish it.
gpg --armor --export EMAIL-ADDRESS > public-key.gpg
Anyone who wants to encrypt something for you needs to import your public key:
gpg --import public-key.gpg
Now people with your key can encrypt data for you:
gpg -r EMAIL-ADDRESS -e FILE-TO-ENCRYPT
This will create an encrypted file FILE-TO-ENCRYPT.gpg that they can send you.
The data can be decrypted by whoever owns your private key (hopefully only yourself; just in case, make sure to use a non-empty passphrase when you create your keys):