Cats are often seen as spiteful, elusive, secretive, and totally untrainable. Not one of these views is true. In working with cats two important things to keep in mind are their biology and their domestication history with humans.
First off, cats were never fully domesticated. Most likely they were allowed to be around because they could rid human settlements of pests. Maybe even encouraged to stick around with a little food. Unlike dogs, however, they continued to keep themselves, to themselves. This is why cats who are not actively socialized to humans during kittenhood, revert to feral very quickly. We have to actually teach them that we are not there to hunt and eat them!
Biologically cats are both prey and predators. While they are extremely effective hunters, they are also small and are in the middle of a food chain. Their elusiveness and secretiveness comes from a need for safety. Cats evade predators by slinking around in the shadows or climbing up high. When a cat does not feel safe in her environment, she will hide under beds, away from the threat, or climb up furniture to escape. These behaviors are instinctive, built into her biology. It does not matter that there is actually no predator waiting to get her. What matters is her perception of what is threatening.
Kittens go through a socialization period at 8 weeks to 12 weeks, where they learn about what is safe in their world. If exposed to what is normal for us during that time, such as friends coming over, or a visiting dog, they will adapt to that as normal and safe for them. This is a vital time to expose kittens to all sorts of new things. Everything from leash walking outdoors, to other animals (including cats and people), to carriers and car rides, to vet visits, to sounds, etc.
All is not lost if you have missed this time with your cat! You can go through a process called habituation where you, very slowly!!!, expose your cat to what they are afraid of. For example, if your cat is afraid of thunder, you can play thunder (thank you Youtube!) starting very quietly at first, increasing the volume over time until that becomes a normal sound in his environment. You can also add desensitization where you pair something your cat loves with the frightening thing. Back to our thunder example, if your cat loves brushing, brush him while playing the thunder quietly and teach him that thunder equals nice relaxing grooming and time with you.
And, lastly, cats do not do things to spite their owners. There is always a reasonable cause (and solution!) behind difficult behaviors. Punitive measures do not work with them. This just causes them to become fearful of you and damages your relationship with them, on top of whatever behavioral issue the punishment was meant to stop. Positive reinforcement is an excellent way to work with any cat. Sometimes it can take a long time to undo learned fears, but it is so worth it for the sweet relationship it can bring. There is no need to live with difficult or unwanted behaviors, nor is there a need to surrender your friend. Almost all behaviors can be worked with.
Happy Training!