Coding interviews are a unique experience: you have to solve tough algorithmic problems in a limited time with somebody looking over how you do it, and with you explaining every step aloud. It may be confusing and stressful even if you are already a good software engineer, and this skill requires practice.
The best way to practice this without the risk of failing to get to the company of your dreams is to do mock interviews. In mock interviews, you solve real interview problems in a setting as close to the real interviews as possible. Here are the ways how you can do it:
Practice with friends. Especially if you have friends who are also preparing for the interviews, you can do a lot of mock interview sessions with each other. Try to get the sessions as close to the real interview as possible: speak English, have a set time limit, use Google Docs, coderpad.io, or a whiteboard.
The downside of practicing with friends is that you already know your "interviewer" in advance, and, as a result, you are not as nervous as you may be in the real interview.
Pramp offers free mock interviews with peers, where you interview somebody over the internet for half an hour, and then they interview you. It is a great way to do mock interviews with strangers, but the quality may vary depending on your peer and the problem the website chooses.
Pramp is also a good way to try to be an interviewer. It is a valuable experience that lets you see the process from the other side, and I strongly suggest trying it.
There are several websites where you can arrange paid interviews with engineers from companies like Google, Facebook, and others. For these, you can check out gainlo.co, interviewing.io, and careercup.com.
These paid interviews tend to be quite expensive, but usually the interviewers are good and the experience overall is pretty helpful. Also, because you pay a lot of money for the interview, you take it very seriously and you are almost as nervous as at the real interview.
Mocks interviews with friends are a nice and free way to practice passing coding interviews. Try to get the experience as close to the real interview as possible: speak English, have a set time limit (somewhere between 45 to 60 minutes), use Google Docs, coderpad.io, or a whiteboard.