In science fiction, a shuttle is a small spaceship designed for transporting personnel and equipment between larger starships or between a starship and a planetary surface. Some types may have some form of FTL drive for inter-planetary or even inter-stellar travel as well. They also may or may not be armed.
Shuttles in Star Wars
The Empire uses Lambda-class shuttles to carry passengers and small amounts of cargo on various routes: ship to ship, ship to planet, and planet to planet. The Lambda-class seems to be distinguished from starships primarily by its size, as it is fully capable of interstellar journeys using its hyperdrive. Shuttles of similar design were in use in the Old Republic, as well.
Shuttles in Star Trek
Nearly all Starfleet capital ships and starbases carry a complement of shuttlecraft. These vehicles typically lack the speed and range of full starships, and many are not even equipped with FTL propulsion. Many are kept on board simply to ferry people between the ship and destinations too distant for the ship's transporter, or for situations where the transporter has been rendered inoperative. Some, but not all, Federation shuttles are lightly armed and shielded. A few heavy combat shuttles do exist, runabouts and the Delta Flyer being the best examples.
The security systems around shuttlecraft and their launch bays are dubious, as unauthorized persons have managed to board and launch shuttlecraft from the bays of Federation starships on multiple occasions.