If you are going to go the traditional publishing route (ie, getting a big-name publisher), you will need to do a query letter. Make sure you check the publisher’s website for the exact format but all will probably require need a few basic things.
Jane Friedman does a great job of outlining a query letter: https://janefriedman.com/query-letters/ .
I always struggled with query letters because they’ll feel like you’re selling yourself—you are. Or more accurately, your writing. This is the first impression that you only have one chance to make. Follow the steps that Friedman outlines, then have others proof your query letter for you, preferably before they’ve read your story. Does it get them interested in reading more? They have to be brutally honest with you or it won’t work. Work on making it concise, without fluffy words.
Your query letter should have a hook that gives the sense of the protagonist, the dilemma he or she is in, choices to be made, and what makes your book stand out–all this without giving up the ending. The hook should leave the reader wanting more, and asking for a synopsis (in which you will have to give up the ending).
I would be wary of online ads that say they can write a great query letter for you for $xxx. If the query letter is supposed to be a sample of your writing, having someone else write it for you seems like cheating. Besides, as painful as it may seem, you will learn a lot from writing it yourself. You will learn to be succinct, which is the beginning of your elevator pitch (more on that later). It will also highlight where you may be lacking in some areas that you need to improve upon.
So your query letter is written, now what? Spend time in bookstores scouring the shelves for books in the same genre as yours. Check the inside cover for the publishing house and take note. Make sure you collect quite a few. This is where the internet has made your job much easier than writers of the past had it. Get to a computer and look up the publishing house, searching for the specific editor that covers your genre. A query letter has a better chance of getting through to the reader if you take the time to address it directly to the him or her.
Another source widely recommended is The Writers’ Market. It is a good tool, but I find it overwhelming and daunting just looking at the thickness. Some people swear by it. I recommend getting a copy from your local library first to see if it’s worth your investment.