What is a 'secret key factory'? What precisely is it doing? I have found a Java implementation of AES CBC mode that runs in Netbeans. The lines below appear to create the key from password and salt:

SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
KeySpec spec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), 65536, 128);
SecretKey tmp = factory.generateSecret(spec);
SecretKey secret = new SecretKeySpec(tmp.getEncoded(), "AES");


The key produced looks strange, here's an example:

secret key : javax.crypto.spec.SecretKeySpec@fffe8a18


I would expect 128 bit key like fffe8a1829ac45ed  If I enter such key of my own making the program crashes. 

I would appreciate an idiot's guide as to what is going on.
SecretKeyFactory is a class from the javax.crypto library. This class is used for generating secret symmetric keys. In other words, it generates a SecretKey object from the input key specification (e.g. PBKDF2WithHmacSHA1). Note that your SecretKey instance inherits from java.security.Key which is Serializable and uses a default RAW encoding format. 

Hence, you should not just toString() directly. As mentioned by Maeher, there is actually a getEncoded() method which returns the key as a byte array in its primary encoding format for viewing.