A time signature is a figure that describes the meter (it's sometimes called a meter signature). The meter of a piece of music is a pattern of accented (stressed) and unaccented (unstressed) beats.
Take a waltz—it's pretty easy to hear ONE, two, three, ONE, two three as the pattern of accented and unaccented beats—the first beat of every three is stronger (louder, usually) than the other two. In a march or polka, it's ONE, two, ONE, two. In most pop music, it's ONE two THREE four, ONE two THREE four, where three is a little stronger than two or four but not as strong as one.
When writing a time signature for a piece of music, you pick one that matches the meter, the pattern of stresses in the music. Here's the thing: by ear, you cannot tell the difference between 3/4 and 3/8, which have the same pattern, or between 2/4 and 2/2. Different genres of music with the same type of meter are written in certain time signatures by tradition, mostly—polkas are usually in 2/4, marches are usually in 2/2.
...if you added rests to the music and wrote it in 7/8 (assuming it wasn't really in 7/8), then whenever someone tried to perform it, they'd perform the rests, interrupting the music frequently.
Does that help? Feel free to ask a followup.