What exactly are muscles?
There are three types of muscle within the body these are cardiac, smooth and skeletal muscle. Generally when talking in a fitness sense we're interested in skeletal muscle. These muscles are also known as voluntary muscles, in other words they are under our conscious (somatic nervous system) control.
Skeletal muscles are used in the movement and control of our body, without them our mobility would be zero. They are made up of bundles of muscle fibres usually found in a regulated pattern. Skeletal muscles can also be broken down into two further categories that most people will have heard of "slow twitch (Type 1)" and "fast twitch (Type 2)". Simply these types of muscle follow their namesakes, with slow twitch able to sustain longer aerobic activity (eg. elite endurance athletes have a lot of this type of fibre) and fast twitch which is able to produce more force but for a smaller amount of time (eg. elite sprinters).
How do they work?
The easiest way to explain how muscles work without going in depth into sliding filament theory, is to use an example of a movement.
One movement most people are familier with is the bicep curl. This is lifting a weight or object from supinated (hands facing away from the body) position to a pronated (hands facing towards the body) position through an arc of flexion (contracting - shortening the muscle).
The first step is for the brain to send a "signal" to your muscle telling it to contract in order to lift the weight from the lower position to the upper. Within the muscle two types of fibre which i'm just going to describe as "thick" and "thin" react to the signal. These two fibres are housed within a unit called a sarcomere, the thick fibre "grabs hold" of the thin fibre and pull it past it (hence the name sliding filament theory). Now that the thin fibre has moved up the thick fibre the entire housing unit (sarcomere) has been shortened. This shortening is the image of contraction you see when you look at a muscle performing flexion.
Just to clear up, within your muscle there are a large number of sarcomeres all performing this shortening (which is actually only moving a distance of microns). However the combined effect of this within the muscle causes a huge generation of force hence being able to lift the weight through the entire arc of flexion.
Simple really! Here's a diagram just to help you see it.