if you think he likes you, and you like him too, keep at it and ask him more questions to get involved in the conversation. maybe you don't have much in common so he doesn't agree with you or something. in that case, ask him what he thinks about what you just said. or just ask him how his day's been or any random question! make an effort to not talk so much next time. maybe he sees you as someone that doesn't shut up so he just lets you talk..
if you don't think he likes you, just say a quick hello, how are you, and then busy yourself with something. try not to be alone with him too much. you could busy yourself by looking on your phone or looking through your books or something... if you don't have to be with him alone then walk away after you've said your hellos. there's no reason why you should stay and carry on talking when he's not making the effort.