My cat likes to push things off of the table. He really likes to push pencils off. But sometimes he pushes valuable things like my small cellphone. I think he knows he shouldn't do this.
How can I train him not to push things off the table?
Based on my experience with cats, your cat is probably doing this for one of two reasons:
The options - particularly if you can't keep him off the table (I've never had success training a cat to stay off a surface. This is very much a "mileage may vary" thing) - depend on why the cat is knocking things off the table.
If he wants attention - learn the signals your cat gives that mean "I want my human to play with me/pet me/feed me" and give him attention before he gets on the table and starts knocking things off. He should figure out pretty quickly that he doesn't need to knock things off the table to get attention - even if that attention isn't quite what he was looking for.
If he wants something to play with - don't keep things he'll play with on the table, and make sure there are plenty of kitty toys he likes on the floor. This will take some rearranging on your part, but once you get your table reorganized so there's nothing on it that he can play with and you've got him a collection of things to play with on the floor, he should stop jumping up on the table for kitty toys (the usual rule with kitty toys is that if the cat likes to play with it, it's a kitty toy). Him knocking pencils off suggests that he likes things that roll around, and probably also things that make noise so some possible options are:
My cat used to steal things off the table but he only does it when we are not around now. The main ways we solved it were to divert him and dissuade him.
We diverted him with strings and other various toys, saying his name, or physically removing him to play in another room. We also used treats and catnip. That, I think because he is a cat, only works about half the time.
To dissuade him we use a spray bottle with water in it. He is not a dumb cat and has learned that when I put the spray bottle in front of him (an don't spray him) I do not like what he is doing and usually stops. And he will stop if I do spray him, which I try to avoid doing too often.
Every cat is different. We have a younger cat who completely ignore these warnings and rewards and only responds to being physically moved or verbally told "no".
I also think that because you might spend a lot of time on your phone, your cat is saying very loudly, "Play with me, not that!" when he does that.
I usually take the opposite approach. Instead of trying to teach my cats not to push things off tables I try to anticipate problems and not let them happen. One of my cats, Pounce de Leon likes to manipulate objects with her paws or mouth. Pencils and pens getting pushed off a table, doesn't really bother me (but if we put them in some kind of holder like a cup that reduces that problem greatly). Small electronics like small digital cameras are attractive to her particularly if they are in a case that has a loop on it- that is an issue. To stop that we don't leave those items on surfaces that she can get to.
You can train them to not do stuff but it can be difficult to convey what you want to a cat. I keep the rules pretty simple with mine. My cats are allowed on many tables and counter tops but some are excluded for safety reasons, like the one that joins with the stove & sink. They seem to understand this rule rather well. When Pounce occasionally broke this rule in the past she would try to pretend she wasn't on the forbidden counter top (but she still got a tap on the nose to let her know it wasn't ok).
My two other cats generally play just with cat toys, but Pounce (like your cat) finds some human artifacts to be interesting. She would (like your cat) enjoy pushing such an object off a table.
Perhaps you could just put cat toys that you don't mind him pushing off about so he can scratch the itch without hunting more valuable items.