In some cases very fast or very slow heart rates can cause loss of consciousness. In either case the heart is unable to deliver enough blood to the brain and this may result in a blackout.
However, not all blackouts are caused by an abnormal heart rhythm. Other possible causes are epilepsy, common fainting spells or strokes, to name but a few. It is generally a good idea to be seen by a health professional if one starts to have blackouts. Blackouts are sometimes called syncope.