You can get some trail gaiters .
(This REI link gives a good overview of different types of gaiters, their components, and materials they can be made from.)
They're basically little sleeve-like things that have a strap to go around the bottom of your hiking boot, and they come up to mid-calf usually.
Because they overlap with both your boot and your pants, they should be pretty good at keeping rocks out of your shoes.
They typically look something like this:
There are, however, variations in types and usage of gaiters.
They can be mid-calf height or knee-high, insulated or uninsulated, waterproof or not.
(Short gaiters that only cover the instep and the ankle are sometimes called spats - they are also sometimes just called "low gaiters".)
outdoors.stackexchange.com/users/77/Laura
For me it's all about gait.
We do river hiking where it's easy to flip up sand into a shoe if not careful.
The trick is to lift your feet and step without either toe or heal dragging, as well as to set them down in a controlled manner.
outdoors.stackexchange.com/users/127/Russell Steen
If you're using mid- to high- length boots, there are a number of models of pants that have a small hook or strap at the very end of the pant leg used to fix the pant leg to the boot lace at the ankle.
These are usually accompanied by a vertical strap so that the pant leg can be fixed snugly around the ankle.
I personally used these while serving in the (Swedish) army.
The M/90 uniform pants have these features and I never got snow/stone/pebbles etc into my boots.
Lundhags "Boot-Loc"-system is an example of this.
outdoors.stackexchange.com/users/689/Björn Roberg
Cut a pair of socks in half!
Cut across about two inches above where the toes would be.
Then slide these over the top of your boots.
Works for me! :)
outdoors.stackexchange.com/users/5962/user5962
If you are hiking in warm weather and want to keep things more light and airy, trail running gaiters (such as these ) are light and breathable and will protect from sand and pebbles specifically.
outdoors.stackexchange.com/users/5963/Gilad Nachmani
So when I hike, usually I get a small pebble or two, or sand in my boots. How can I prevent this? I already wear pretty tight boots, and stopping every so often to take off a boot and get a rock out is annoying.
How do I prevent rocks or sand from getting in my boots?
outdoors.stackexchange.com
<hiking><boots>
outdoors.stackexchange.com/questions/1795
outdoors.stackexchange.com/users/527/MaskedPlant
Using trail gaiters, cutting a pair of socks in half, or pants that hook onto the boot laces are methods to prevent this. The gait can also help, by lifting and placing the feet properly without dragging. Good gait and ensuring you lift your feet are important. Socks cut in half, trail gaiters and pants with hooks/straps can help.
Trail gaiters, socks cut in half and pants with hooks/straps can help. Good gait, ensuring you lift your feet without your toes and heels dragging, is key.