What does it mean when you catch a guy staring at you and then he smiles?

Could be several different things. Perhaps he was just looking at you, and then smiels to be nice. Maybe he likes you, and whenever he sees you, he gets happy. He could also be shy, and then he smiles whenever you look back at him. It could be a naughty smile, because he maybe thinks you look good, and want to do things with you ;)
There are lots of possibilities. It really depends on the smile :)