Under normal conditions, the heart's sinoatrial node determines the rate by which the organ beats - in other words, it is the heart's "pacemaker." The electrical activity of sinus rhythm originates in the sinoatrial node and depolarizes the atria. Current then passes from the atria through the bundle of His, from which it travels along Purkinje fibers to reach and depolarize the ventricles. This sinus rhythm is important because it ensures that the heart's atria reliably contract before the ventricles.
In junctional rhythm, however, the sinoatrial node does not control the heart's rhythm - this can happen in the case of a block in conduction somewhere along the pathway described above. When this happens, the heart's atrioventricular node takes over as the pacemaker. In the case of a junctional rhythm, the atria will actually still contract before the ventricles; however, this does not happen by the normal pathway of activation and instead is due to a backwards or retrograde conduction (conduction comes from the AV node into and through the atria).
Junctional rhythm can be diagnosed by looking at an ECG: it usually presents without a P wave or with an inverted P wave. Retrograde P waves refers to the depolarization from the AV node back towards the SA node.