Do you want to publish a custom ROM or an app in Android system, of course you get to firstly sign the .apk or .zip files plus a certificate with a private key. And then the system inside Android will take the certificate in order identifying the app's author and then to establish its trustfulness.

Fortunatley an XDA member namely Andyharney, brings a tool that will make you able to generate your own set of Private Keys, so you can sign APKs of your own. The keys that are generated with this tool are obedient with the requirements of Android Market.