You brute-force create private keys until you have one whose corresponding public key starts with your desired string. A commonly recommended command-line tool to do this is vanitygen. I feel the urge to say "I do not endorse that tool's security." (Though the same goes for Bitcoin generally.)
Your address isn't a public key. It is the formatted hash of a public key.