Copyright laws vary from country to country--although many nations belong to groups which share a common copyright law, such as the "Berne convention."
In general, though, copyright is inherent to the creation of an original work--when you have written it (and, in the US at least, committed it to a "tangible form") you own the copyright to that work. In the publishing world, it has been customary for authors to sell their copyright to publishers (or some subset of the rights--for example, if you sold an article to a magazine and they bought "North American serial" rights, you would still control rights to publish in other parts of the world and in other forms, such as anthologies.)
Hubpages explicitly allows authors to retain copyright, so you can do what you like with your Hub content. Whether your Hubs could remain online after publication of your book would depend upon the contract you signed with the book publisher. Presumably, though, if they wanted the content to be exclusive to their publication, they should be willing to pay for a larger 'basket' of rights than otherwise--and you should at least ask about this, when the time comes.