Lots of possibilities for gap filling. Here are a few:
Small gaps can often be pulled together with a good clamp, then held in place with screws and glue. Obviously, the wood will have a tendency to pull apart, so you don't want to do this with big gaps; say, nothing over 1/16th of an inch. I typically use parallel jaw clamps like those made by Bessey or Jorgenson.
Larger gaps need to be filled rather than pulled together. Bondo works well for this. You can also use wood putty, but it has a tendency to shrink as it cures. Which means that you often have to go back and fill the same gap a second time. Bondo doesn't shrink and is very easy to sand. It doesn't look like wood, however, so it isn't appropriate for anything that will be stained.
For very large gaps, there are two-part epoxy putties. They start out with the consistency of Play-doh and quickly cure to an ultra-hard, sandable compound. WoodEpox and SculpWood are the two brands I'm familiar with. SculpWood is made by System3 and might the easier of the two to find. WoodCraft used to carry it, but it doesn't seem to be available on their website anymore. My local shop had some in stock last time I visited, however. The downside to these products is that they're very expensive!
If you can't find, or don't want to pay for, the epoxy fillers, the final option is to glue a wood strip into the gap. It doesn't have to be a perfect fit, just good enough to close the gap so that it can then be filled with Bondo or wood putty. I often cut these by hand, but it's pretty difficult if you don't have a very good saw. An easier option might be to buy a back of wood shims from your local home center store (e.g. Home Depot, Lowe's).