Visiting Madinah is highly sunnah — pray at Masjid al-Nabawi, visit the Rawdah, Masjid Quba, and Uhud; the Haramain train connects Mekkah to Madinah in 2-3 hours.
Visiting Madinah is highly sunnah and most Haji packages include it, though it is not a ritual obligation of Haji. Nabi (shallallahu alaihi wa sallam) said: 'A shalat in my masjid is better than a thousand shalat in any other masjid except Masjidil Haram' (Bukhari and Muslim). There is no ihram requirement for visiting Madinah — you travel in your regular clothing.
Key sites to visit include: Masjid al-Nabawi for shalat and visiting the Rawdah (the area between Nabi's pulpit and his chamber, described as a garden of Paradise), sending salutations upon Nabi at his grave, praying at Masjid Quba (praying two rakaat there equals the reward of an Umrah according to hadith), visiting the Uhud battlefield and the martyrs' cemetery, and exploring the famous date market. The Haramain high-speed train connects Mekkah to Madinah in about 2-3 hours and is the most comfortable option. Most jamaah haji spend 3-5 days in Madinah.
Source: Sahih al-Bukhari; Sahih Muslim; Sunan al-Nasa'i