There are two aspects of this concept. The first one is the name of the deity Heka. The other one is the act of using heka.
Heka the deity:
One of the three creative powers of the Sungod Ra, which were neccessary for Creation to come about. Thus Heka was the divine energy or the life force, the other two were Hu - divine utterance, and Sia - divine knowledge.
Heka was personified as a man standing in front of the naos where the Sungod is seen, in the sunboat, and sometimes holding different rutal objects.
Using Heka - A note about heka and "magic":
The ancient Egyptan word heka could be translated as "magic". It would be more correct to call it Life Force in Action. In our modern day Western society the word magic has other connotations than the ancient Egyptians attached to the concept of heka. The word was neutral in itself and could be used to direct oneself to the centerpoint of cult and of creation, for maintaining the Cosmic Order and Balance (see MaŽat). In other words, it was no more and no less a form of ritualized prayer. It could be used to refer to texts which were written or spoken.
Words
Words in themselves were regarded as divine by the ancient Egyptans, and were to be treated with great respect. Weret-Hekau, Great of Magic, was one of the titles of Aset, as in myth she managed to trick Ra into revealing his secret name to her. The same title was also used for Sekhmet. To know the name of something meant to have power over it.
Heka was not only particular to the deity who acted from and with it, humans too have life force and can of course use heka to come into contact with the divine. The ancients believed that with the help of heka they could influence the world of the gods.
As heka was used both in temple ritual and in more informal situations, one sees the possible reason of equating it for "magic". It had, however, nothing to do with evoking spirits or any supernatural phenomena. It was a way of addressing oneself to God.