There is no current agreement regarding of a universal legal
definition of [terrorism].
That's not how international law works.
There are many sources of international law, but it is fundamentally different from national law. This is because there is no "Leader" of the world. National laws can be enforced by a government, which has a "monopoly of violence" - it can put you in jail if you break the law. There is nothing analogous between sovereign nations.
So international law depends on the agreement and consent of the various nations and their governments. Much is "customary", that is expressions like "crime against humanity" are understood in context from their use and the general meaning of the words, rather than being narrowly defined in a statute or code of law. Also remember that not all the world speaks English, and translations may differ, and different cultures may understand English words differently.
So in customary use, for example, the acts of Sept 11 2001 are described as terrorism in UNSC Resolution 1373 - So a working definition could be
An act similar to those of Sept 11 2001
However, the UN does use the word "terrorist" (for example in Resolution 2187)
The UN Drugs and Crime section has a useful and fairly clear summary of the state of the definition of "terrorism" as they understand it in international law:
Although there is no current agreement regarding of a universal legal
definition of the term, there has been some debate regarding the
possible existence of an, at least partial, customary definition of
terrorism. This followed the somewhat controversial judgment of the
Special Tribunal for Lebanon in 2011, which found that since at least
2005, a definition of "transnational terrorism" has existed within
customary international law:
As we shall see, a number of treaties, UN resolutions, and the
legislative and judicial practice of States evince the formation of a
general opinio juris in the international community, accompanied by a
practice consistent with such opinio, to the effect that a customary
rule of international law regarding the international crime of
terrorism, at least in time of peace, has indeed emerged. This
customary rule requires the following three key elements: (i) the
perpetration of a criminal act (such as murder, kidnapping,
hostage-taking, arson, and so on), or threatening such an act; (ii)
the intent to spread fear among the population (which would generally
entail the creation of public danger) or directly or indirectly coerce
a national or international authority to take some action, or to
refrain from taking it; (iii) when the act involves a transnational
element. ( Interlocutory Decision, 2011, para. 85).
In reaching such a finding, the Tribunal relied primarily upon
relevant United Nations policies, practices, and norms, including
those of the General Assembly, as well as upon national and
international jurisprudence. Furthermore, it was stated by the
Tribunal that the necessary substantive (objective and subjective)
elements for two other classes of terrorist criminal conduct also
existed within international law: war crimes committed in the course
of international or non-international armed conflict; and those acts
crossing the threshold to constitute crimes against humanity, whether
perpetrated during peace time or armed conflict.
So there you have it: A terrorist is someone who commits criminal acts with the intent of spreading fear among a population or to coerse a government.
Now the trouble with definitions is that they get abused to prove points. I'm pretty familiar with this over on Astronomy.se, where every so often someone comes up with some reason why the IAU definition of "planet" includes Pluto (or excludes Jupiter etc). So I shall repeat the most important line of my quote:
There is no current agreement regarding of a universal legal
definition of [terrorism].
Sources