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:
If no one likes it and people misunderstand what you had to say, you will still have written a goddamn book, which is something an awful lot of would-be writers cannot say.
You're probably not going to be the next JK Rowling. You may get published, if you have a strong voice that other people want to listen to and/or you're willing to get and heed feedback to hone your work into something that does get the message you want through and does make other people want to read it.
But, ultimately, you've got to do something like this not for the external rewards, but for what it means to you.
Honestly, i feel the best advice someone can give you is to write because you want to write, not because you are trying to impress others or prove yourself.
Do it because it's your passion, let characters and ideas flow naturally and get a rhythm for your writing style. You're going to write a few stinkers first. This is ok. No-one is a master in the first attempt, it took Stephen King years before he even got off the ground.
You could take lessons on something like skillshare if you want to understand writing structure and sentence composition better, if you want to try and improve the technical side to your writing. But some of my favourite authors are zany, stream-of-consciousness style writers that may seem amateurish but are actually exciting and sometimes thought provoking. I am particularly fond of The Book with No Name and John Dies At The End