As I'm a new writer, I don't know how to get copyright for my first book. Could anyone help me please? My book is an e-book in E-Pub format.
WHERE? It differs from country to country.
In the US, you can register it with the Copyright Office. In other countries usually there's some counterpart to that.
Note - you already own copyright for your book. It happened the moment you saved the final form, automatically. Still, if you want your rights protected, you need some means of proving that you own copyright to that work - otherwise it's just your word against word of whoever plagiarized your work. There is a number of methods of proving you own the copyright, but registering your work with the copyright office is about the most reliable and simple.
The important part here is that you always and already own the copyright to your work, at least in all 167 countries that have signed the Berne Convention. There is nothing you need to do to own it. Even in the US, registration of a work with the Copyright Office is not a prerequisite for copyright protection, according to section 408 of the U.S. Copyright Act of 1976.
What you need to do is make sure you can prove that it is your work and, for questions of plagiarism, when you created it. That is the purpose of copyright registration in the US. It is also required in the US for some benefits, such as awards of statutory damages. Usually adequate proof is created when your work is published, e.g. by having your book printed by a publisher.
If your work remains unpublished and you are not in the US (and cannot register your work), you can deposit a copy of your work with a lawyer or notary.
Apart from the links provided in my answer, the FAQ of the US Copyright Office provides a lot of useful information.
The ownership of the copyright is de facto attributed to the author as he creates the work.
However, you may have to prove that you are the author against possible claims by someone else. All means that can prove your authorship are appropriate. You can register it with a public notary, or you can publish an unforgeable signature (SHA1) on the Internet and manage to have it stored by the Internet archive. Or you can publish that signature as a classified ad in a newspaper (some corporations did that). What is important is to have a date officialised when you were the only one (plus your trusted ones) to know the content of the book. Publishing may do that too, if you intend to go through a professional publisher, which not everyone does any longer.
If your book is published in the USA first, you need to register it with the US copyright office if you want to be able to sue copyright infringers in the USA (article 411 of copyright law). You can register at any time, but it has to be before the infringement started if you seek statutory damages or attorney fees (article 412 of copyright law). Registration does not grant you the copyright (you already have it) but it grants the right to sue to whoever owns the copyright (it can be sold).
However if you publish first in another country, you can sue copyright violations in the USA without registering (as a consequence of the Berne Convention). However, you cannot claim damage or attorney fees if you had not registered before the infringement started.
Note that it is the country of first publication that matters, not the nationality of the author, or the country where it was written, or the language used. So, for an e-book, try to make it available in another country first, so that it is better protected in the USA, strange as it may seem. This works for US citizens too.
In all other countries (member of one of the major treaties on intellectual property), afaik, you can simply sue all copyright violations, and with at least the same legal protections as local citizens (even when they are subjects). There is no registration formality.
A last point is that copyright violation is not the same as plagiarism. Copyright violation is duplicating your book without your consent. Plagiarism is pretending to be the author of your book, or of parts of your book.
Authorship is a moral right, independent from copyright. You can sell your copyright, in whole or in parts. But authorship remains with the author. It is protected by article 6bis of the Berne Convention. You can sue for plagiarism even when you do not own the copyright, but the specifics are country dependent.
IANAL - this is no advice and I am not a lawyer ... I probably do not even exist.