As said, hardwood is best. Solid wood is a good idea. Old/dried out as better. That said, I have used softwood before. I have used freshly cut branches that obviously were not dried out.
I personally boil all wood I put into my tank. My main reason is so it doesn't float forever. It also will release tannins in the process so less will end up in your tank, sometimes to the point it's really a non issue. In that process, you get rid of a lot of things that would be harmful or annoying as well, from bugs to sap, etc. I am guessing it would reduce any chemicals but I can't say for sure. I doubt that anywhere I collect would have purposely released chemicals as their is no reason for it the areas around me but I can't say for certain, I have yet to have an issue though.