A job reference is basically a letter or verbal confirmation that you attended a place of work for a certain period. The reference may also include information on your skills and the work you did for the previous company. The idea of a reference is to give the prospective employer an idea of what kind of worker you are.
Many people worry about giving out details for their current employer as a reference until they have handed their notice in, but most job applications will ask for this. If you explain to the prospective employer, they will usually understand and not contact any references until after they have offered you the job. This offer is usually a condition one meaning that they can revoke the job offer should the references not be suitable.
An employer is under no legal obligation to give you a reference but most will. They can detail information such as disciplinary details etc, but all the information they give has to be 100% accurate.