The details/ description could have been better -
What you say suggests tachycardia (fast heart rate
) / Onset all of a sudden, equally sudden stopping, fast and regular beatings generally is Supra Ventricular Tachycardia
) / generally additional nerve
paths in heart and impulses changing routes at times...
These things can not be diagnosed by description. At times, even seeing an ECG may not help / it may not be present at that time / could be misleading from other factors and so on
You have to see the doctor - they will start with routine ECG, ECHO and blood work. You may need 24 or 48 hours ambulatory monitoring (Holter) to document and analyse. Subsequently, an Electro Physiological Study (EPS) is done - to locate the nerve (by-pass tract) / confirm its role / ablate it by radio-frequency / and so on
There are specially trained sub-specialists within cardiac super-speciality consultants
Sounds a bit worrying? _ it is actually simple and safe in expert hands
Any tertiary care super-speciality hospital will have this facility and a cure is almost certain...
There are more - but it is like searching a needle in haystack - without further information and basic work out