We present an algorithm to identify the type of an SN spectrum and to determine its redshift and age. This algorithm, based on the correlation techniques of Tonry & Davis, is implemented in the Supernova Identification (SNID) code. It is used by members of ongoing high-redshift SN searches to distinguish between type Ia and type Ib/c SNe, and to identify "peculiar" SNe Ia. We develop a diagnostic to quantify the quality of a correlation between the input and template spectra, which enables a formal evaluation of the associated redshift error. Furthermore, by comparing the correlation redshifts obtained using SNID with those determined from narrow lines in the SN host galaxy spectrum, we show that accurate redshifts (with a typical error less than 0.01) can be determined for SNe Ia without a spectrum of the host galaxy. Last, the age of an input spectrum is determined with a typical 3-day accuracy, shown here by using high-redshift SNe Ia with well-sampled light curves. The success of the correlation technique confirms the similarity of some SNe Ia at low and high redshifts. The SNID code, which is available to the community, can also be used for comparative studies of SN spectra, as well as comparisons between data and models.