A rehearsal dinner is customarily held the night before the wedding. The rehearsal itself is usually held before the dinner. The rehearsal dinner serves as a smaller more intimate party than the much larger wedding reception. Many times it is only the bridal party and select others at the rehearsal dinner.
One slight correction, what you called the groomsmen party is actually called a bachelor party. It is for the groom and his groomsmen. Sometimes other guests are invited to the bachelor party even though they might not be groomsmen. The bride has a version of this too and it is called a bachelorette party.