This definition goes back to Aristotle:
"A deduction is speech (logos) in which, certain things having been supposed, something different from those supposed results of necessity because of their being so. (Prior Analytics I.2, 24b18–20)"
An argument is a "speech" where we have some premises and a conclusion.
When the conclusion "follows from" the premises (by logic alone) we say that the argument is (logically) valid and the conclusion is a logical consequence of the premises.
In every mathematical theory, every theorem proved from the axioms of the theory is a logical consequence of the axioms.
The key point is the elucidation of the concept of following by logic alone.
We can use the notion of logical form, abstracting from the specific vocabulary of the argument and considering an argument schema that is topic neutral.
This technique is as old as formal logic itself. See Aristotle, Prior An, 26a16-26a30:
if $A$ belongs to no $B$ and $B$ to some $C$, it is necessary that $A$ does not belong to some $C$.
The modern approach uses formal languages, with the logical machinery modelled with connectives, quantifiers (the logical constants) and variables.
In this way, a logical schema is one involving only the logical constants and topic-neutral vocabulary.
A logically valid inference is an instance of a logical schema all of whose instances are truth-preserving.
The way to assess the validity is to consider all possible instances, i.e. every interpretation of the variables.
For more details, see e.g. Peter Smith, An Introduction to Formal Logic, Cambridge UP (2003), Ch.3 Patterns of inference.