For some, the difference between acting confident and being a jerk is extremely obvious. For others, it’s mysterious to the point of thinking that the one is just code for the other. Unfortunately, the former are rarely able to explain how to tell the difference between the two to the latter. It’s actually not that hard, though.
Confident people speak like what they are saying is true and is important. Jerks speak like they are an authority and that they personally are important.
You can also see this distinction in each person’s attitude toward agreement. Confident people speak like they don’t need people to agree with them. Jerks speak like the world will end if people don’t agree with them.
From the above, it should be obvious that if you want to learn how to be confident, the first step is developing your knowledge and skills to the point where what you say is both important and true. If you know that they are, then there’s nothing special to do. In that case, all you have to do to act confidently is to refrain from certain mannerisms. In particular, don’t weaken what you say with “I think”, “it seems”, “in my opinion”, etc. They’re completely redundant anyway. If you’re saying it, people know that you think it. If you said it, people know that it was your opinion. To speak confidently, just say what’s true, stop talking, and trust your listener.
And if you’re knowledge and skills are not to the point where you’re certain that what you’re saying is both important and true, then don’t act confidently. Consider not speaking at all, but if you do, this is the time for qualifying what you say with “it might be” and “I’m not sure”. But as soon as you’ve gotten that over with, go develop your knowledge and skills until you have something to be confident about.