How do you use next in a sentence?

examples :

He was sitting next to me.

He's gonna be the next president.

My salary is next to nothing.