Primer dimer will be much smaller in size (visualised on a gel) and will melt at a lower temperature (visualised on the real-time PCR machine).
You can minimize primer dimer formation by using good primers (I use Primer3 to design) and a hotstart polymerase (I never see any primer dimers and I run hundreds of realtime PCRs).
If you do suspect your product is primer dimer, it will be more abundant in samples that contain less of your target gene; therefore, if you do a serial dilution of your cDNA/ RNA, your target gene will be less abundant but primer dimer will increase.