In terms of programming-language jargon, there are several notions of semantics:
Static semantics tells you which programs that are grammatical are also well formed. Many languages either have no static semantics (Scheme, Ruby, Python, Icon, Lua, Perl) or have a static semantics that is primarily about implementing a type system (Java, C, C#, Haskell). "Declaration required before use" is another possible static semantics. Static semantics answers the question "is this program meaningful?" and does so at compile time.
Dynamic semantics tells you one of two things:
- Given that a program is meaningful, what is its meaning? Meaning has been defined mathematically in many, many different ways. A classic dynamic semantics might define a function (or a relation) between a program's inputs and the program's outputs. Meaning functions ("denotational semantics") were pioneered by Dana Scott and Christopher Strachey; meaning relations ("axiomatic semantics") were pioneered by Tony Hoare. Scott and Hoare won Turing awards; Strachey probably would have, but he died young. A good way to get introduced would be to read Tony Hoare's book Essays in Computing Science.
- Given that a program is meaningful, how will it behave when executed?. This kind of semantics is usually called an "operational semantics" and describes the execution of the program on some kind of abstract machine. Again, there are many, many varieties. Today operational semantics is the tool of choice because there are powerful proof techniques, so for example, using operational semantics you can prove that there is never a memory error in managed code. Robin Milner got his Turing award in part for different operational techniques used to describe concurrent or multithreaded programs (CCS and the pi calculus). His 1999 book on Communicating and Mobile Systems is also a very good read if you skip the proofs :-)
If you read the word "semantics" in a manual or article, and the context is informal English rather than precise mathematical description, the author is probably referring to the dynamic operational behavior—if you will, an operational semantics informally described. This kind of informal description can be quite helpful to compiler writers and programmers.