you can generate it offline. If you are using linux (I think OSX too) you can download the source code and go to ~/bitsharesx/programs/utils once there type ./bts_create_key This will return something along the lines of
public key: BTSX7389Tnsibg3NdgVFH2x6pZoGMzoqsjbVKY9bEwQ3Dm7PTqDeAA
private key: bd703b04972b721ddae1431710e4c28b086b1bef3219ab55bb4cf767b0029372
private key WIF format: 5KFiXmCjcBWUFtDSFgVop8GjJ7Ycp64889iLvY8ZaEwQcZUD7KA
bts address: BTSXH8qJ332uTf7C1iUDzFKLtWhfGF6EvahAi
pts address: PsSNjyGHy9d3yCnXi1122gVtpo7PatVqaw
You should keep all of this information.
Once you have the public private key pair, you can choose to register that public key on the blockchain or not. It doesn't really matter, but registering makes it easier to get to your funds if all you have is your private key.
For more specific directions I would direct you to
https://bitsharestalk.org/index.php?topic=6232.0 or the bitshares wiki (I'm not sure of the state of the current documentation there)
Some things to keep in mind:
You can not currently change the vote of funds held in cold storage. They will retain the vote of the transaction that sent them there until they are retrieved and respent.
If you are running on windows I would strongly recommend that you use a secure operating system to generate your public private key. Tails springs to mind. More information is available at
https://tails.boum.org/Let me know if you have any further questions or issues.