Time signatures generally accomplish two things: they suggest a pattern of strong and weak pulses (and relative strong and weak pulses), and they define the notation for those pulses. Each "measure" contains one sequence of the pulse-emphasis pattern.
Simple meter
The most basic patterns are two-time (strong weak | strong weak) and three-time (strong weak weak | strong weak weak). A time signature with a 2 or 3 on top, suggests one of these patterns, unless otherwise noted (or notated). The lower number then just tells you which type of note corresponds to this basic pulse. Thus 2/2, 2/4, and 2/8 (or 3/2, 3/4, and 3/8) would all have the same pulse-emphasis pattern, just notated differently.
Compound meter
When you have an upper number that is a multiple of 2 or 3, then you get overlapping pulse-emphasis patterns. Thus in four-time, you have two strong-weak pairs in which the first is stronger than the second.
strong - weak - strong - weak
strong - weak
_____________________________________
strong - weak - semi-strong - weakest
An extensive discussion of this arose in the question Rhythmic/Metric Stress Patterns
Complex meter
When the upper number is not a multiple of two or three, then the pulse-emphasis pattern needs to be clarified. This can be done via the notation itself or via the time signature. Five-time can be notated as groupings of 2 and 3 beats, or 3 and 2 beats, or the time signature could be written as 3+2/X or 2+3/X.
Irregularly pulsed music
In John Adams's Phrygian Gates, the composer wants every note to be played with exactly equal emphasis. The score gives no time signature, and bar lines are only give to help the performer keep track of where they are in the piece.
György Ligeti, in the first of his Études pour piano, "Désordre", wants an irregular pulse pattern, both within each hand and between the two hands. To accomplish this, he uses a combination of accent markings and bar lines that don't align between the left-hand and right-hand staves.
Erik Satie eliminates both time signature and bar lines altogether in his "Gnossienne #1". Although the notation of the piece clearly suggests 4/4 time, the absence of bar lines indicates an equality of pulse, or that pulses may be applied at the performers discretion.