SUN defined a cryptography API in terms of interface classes (called Java Cryptography Extensions, short JCE). A provider implements these classes and makes methods for e.g. encryption or key-management available. The design is very flexible and allows a programmer to use any available provider (making the actual implementation transparent and interchangeable) or to specify at runtime the specific provider to use.
You will of course find information about the crypto API on the webpages of Javasoft. SUN also has a default provider with very limited capabilities included in the JDK 1.2. A fairly complete implementation is also available for the US and Canada. Because of US export laws, this implementation is not downloadable from outside of North America.
There are additional providers available, some are free, others require to pay license fees. I recommend that you take a look at Cryptix and at OpenJCE. These are open-source implementations and allow you to have a look at the algorithms they use.
I have written a few sample applications which show the use of the API. These applications aren't really useful but they should give you a quick start. They assume that a provider is installed properly (they usually provide installation instructions).
You can download the source tarball from here. Compilation should be no problem. For one sample you also need my Java-Readline wrapper.