I wrote an article on Octrees a while back. It should give you 90% of what you're looking for if you want to learn about octrees.
My recommendation is to avoid the overly complicated "updates in place" I wrote about and instead just wipe the whole tree each frame and rebuild it. It's still faster than O(N^2) search time and way more simple to find and fix problems ;) The important thing is to get it to work first, then optimize later if you still have performance issues which you've determined through measurements. In some cases, the added complexity you think will increase performance will actually decrease it
Anyways, let me know if you have any questions.