Usually causality is simply defined as the cause coming before the effect in all valid reference frames. For example, if I throw a baseball and knock over a lamp, in all valid reference frames, I should have first thrown the baseball, and the lamp should have fallen over second. In no frame should the lamp fall over and then I throw the baseball.
In Minkowski space-time, this is simple. To demand causality, we simply demand that no object (any energy-mass, or even "classical information") can travel faster than the speed of light. This is because the so called "causal structure" of Minkowski space-time is simply dictated by the light cones which are always at 45 degree angles to the horizontal (in a t versus x graph). For events which are time-like separated, it is a well-known fact, that all inertial reference frames will observe the ordering of the events in the same way (although the time which passes between them can differ). In this way, if I throw a baseball first, and the lamp gets knocked down second, and these events are time-like separated (i.e. the event "lamp gets knocked down" is within the lightcone of the event "I threw the baseball"), in every inertial reference frame (which are all the reference frames "allowed" in special relativity") will see me throw the baseball first and have the lamp get knocked down second. For events which are space-like separated (e.g. if my baseball went faster than the speed of light), then there are always inertial frames which see the events in a different time ordering than me. In that case, we cannot say that the cause always came before the effect, and we call this "violating causality".
In general relativity, this is more complicated. The lightcones may twist around and there could be created time-like closed loops, or causal closed loops in which a particle, always moving "forward in time" (defined below more rigorously), somehow travels to an event it has been at before. This can create whole new causality problems in which (if we can identify a particle's future with it's past) we cannot unambiguously say that a cause came "before" an effect. We usually call space-times with causal structures that contain closed time-like curves unphysical, and we usually restrict our analysis to space-times which obey so-called causality conditions, of which there are a whole heirarchy. If you want more detail, I suggest perhaps Wald chapter 8 where he goes in grueling detail over many theorems and lemmas and propositions which deal with the causal structure of space-time.