In this case it's called paroxysmal atrial fibrillation (AF). You may have symptoms that come and go, lasting for a few minutes to hours and then stopping on their own.
With this type of AF, your heart rhythm doesn't go back to normal on its own. If you have persistent AF, you'll need treatment such as an electrical shock or medications in order to restore your heart rhythm.
Long-standing persistent AF
This type of AF is continuous and lasts longer than 12 months.
In this type of AF, the abnormal heart rhythm can't be restored. You'll have AF permanently, and you'll often require medications to control your heart rate.
Source: Mayo Clinic