Miter boxes (spelled mitre in some parts of the world) are devices that help guide a saw so it can cut a precise angle, such as 45 degrees. Plenty of commercial options are available, usually constructed from plastic, but you can also make your own miter boxes with just a few pieces of wood.
The most typical design is a bottom piece with two sides extending upward, creating a channel for the wood you'll be cutting to fit in the middle. Using an angle finding tool, you can then draw whatever angles you'd like to be able to cut routinely (45 and 90 degrees are popular choices), then cut them through the sides. Whenever you need to cut a specific angle, just slide the material you're slicing into the channel, place the saw in the corresponding line, and cut away.