When to Replace Your RubberUsually the easiest way to tell if a normal inverted rubber needs replacement is to hold a table tennis ball firmly in your fingers, and drag it over the rubber, from the side, across the middle, and to the other side. If the ball starts to slide more easily in the middle of the rubber, it's time to replace the rubber. Some of the paddles sold by sports stores are either so old the rubber has deteriorated, or use low quality rubber in the first place, so if you are going to buy a ping-pong paddle from a sports store I'd recommend checking the grip of the rubber first. It may not be a great racket, but at least it will have some grip, allowing you to put spin on the ball, which is crucial to playing modern table tennis.
Pips-out rubber and antispin rubber are a bit different. For pips out rubber, I'd generally be looking for too many missing pips in one location, which can change the playing characteristic of the surface, which is illegal (according to regulations 7.4.1 and 7.4.2 of the ITTF Handbook for Match Officials), and Law 184.108.40.206). Or if the pips have changed in some other way, such as turning brittle or slippery, you should get a fresh sheet. For antispin rubbers, it is usually time to change the rubber if the grip is noticeably different in different places on the rubber, or if you somehow rip or tear the rubber. Otherwise some antispin rubbers can last for a long time.
Another reason for changing your rubber is if the sponge underneath the topsheet has degraded, so that the ball bounces differently in the middle of the racket compared to the sides. It's hard to play well with a rubber that bounces differently in different spots. This usually affects pips-out rubbers and antispin more than inverted rubbers, since the topsheet usually wears out faster than the sponge in inverted rubbers - at least for me!
Replacing the Rubbers on Your Table Tennis BatIt's usually best to learn to put your rubbers on your blade yourself, because if you have a decent blade your rubbers will wear out well before your blade does (some players use the same blade for over 20 years!), so you will have to replace the rubbers sooner or later. If you know how to do it, you won't be dependent on the generosity of others to get your bat updated!
If you originally buy your blade and rubbers from a online or local dealer who puts them together for you, they'll use glue that will allow you to remove the rubbers easily, so that you can buy new rubbers and put them on your blade when the old ones wear out. It's not that hard to do really, you can check out my explanation and video on how to glue your normal rubbers to a blade here. Oh, and here's the same thing for gluing pip-out rubbers with no sponge, which are a bit more difficult to glue successfully.