You need a compression gauge from an auto parts store. Some may rent them out or loan them, but they are not too expensive to buy either. Make sure the tester has an M14 attachment, but I am sure all must. This is a very common spark plug size.
Make sure the bike is off, the spark plugs are removed, and the throttle is wide open when testing (while turning the engine over). Taking the carbs off would also work.
You screw in the tester and turn the engine over; the kick start works well as it won't kill the battery. I kick the engine about 10 or 15 times per side. This is a dry test.
For a wet test you simply add something like a teaspoon of oil through the spark plug holes before installing the tester and kicking the engine over.
You want something like 150 psi per side.
If the compression is low during a dry test, but improves or becomes normal during a wet test the piston rings are the problem.
If the compression is low during a wet and dry test the valves are probably the problem.
Those are the simplest scenarios. This testing is important to rule these problems out or identify them if they exist. If you don't have high enough compression the bike will not start, but it may pop, sputter, and backfire.