So I'm currently trying to write a book but the problem I keep having is that I lose motivation because I have a lack of self-confidence and keep thinking things like, "No one's going to like this." "People will misunderstand what I'm saying." and things like that.
I'm well aware of all the difficulties involved with writing and publishing a book, that's my problem, my request for advice is how I can be more confident in myself and be reminded of the good things that could come from this.
Write a lot of short stories, or other short form works. When and if those stories start meeting significant acclaim, THEN write a book with the earned confidence.
'Cause, y'know, odds are very good that you're absolutely right about people "misunderstanding" and not liking your book.
I'd say try to not worry about whether the book might be successful or not. If you go in with the aim of making money off it there is always a chance it'll fail and that will ruin your morale. Just write it because you want to write a book. When you finish, if you are happy with it, show some friends or family. Take constructive criticism on board and try to improve it further. If someone you trust assures you it is good then look at getting it published.
Most authors write a lot of crap before they start writing good stuff. Accept the fact that you'll write a lot of crap and dive right into to writing crap you wish was better.
It's like anything else. Want to be good at shooting free throws? Be prepared to miss a lot first.
There's a few good books out there on writing. Stephen King's On Writing is good - the first half is autobiographical about becoming a writer, the second half is actual advice. I also like Peter Elbow's Writing With Power, which has a lot of good advice. If you was to write formulaic television plots, check out Save the Cat! by Blake Snyder. It's also good for seeing what cliches to avoid.
But mainly, this: