You can extract the public key. This has limited usefulness. Perhaps you are going to use the same key with another tool like SSH or PGP that doesn't use certificates.
With OpenSSL:
openssl x509 -pubkey -noout < cert.pem > pubkey.pem
You can't derive the private key from a certificate. That would make the whole thing quite pointless, wouldn't it?