Chainsaw chains eventually wear out---it can get bent and pinched during use or worn down from constant sharpening. Check your Ryobi manual to see when your chain should be replaced. When it's time for a new chain, replacement blades are available online or at garden centres. It's always a good idea to get two chains for your Ryobi, since they often come packaged together at a discounted price. That way you can keep a spare chain in your chainsaw case.
Allow the chainsaw to cool down. If it is an electric saw, unplug it from electricity. Place the saw on a level work area.
Loosen the two nuts holding the bar cover plate in place. Loosen the chain tensioning screw by turning it counterclockwise as far as it will go. (The tensioning screw is located on the side of the saw that normally faces the tree, to the lower right of the chain bar; or it may be a slot in the bar or a screw between the two cover plate nuts.)
Remove the bar cover. Slide the old chain off of the bar.
Optionally remove the bar and clean it with a rag and solvent. Clean the saw and the bar cover. Replace the bar.
Slip the new chain onto the sprocket and bar, making sure the cutting edge is facing forward on top of the bar. Rotate the chain once by hand to make sure it is in the proper track. Replace the bar cover. Replace the two retaining nuts, fastening them loosely by hand.
Rest the saw on the flat work surface and elevate the tip of the saw blade on a small scrap of 2x4 lumber. Tighten the tensioning screw clockwise until there is 1/8 inch to 1/4 inch of slack in the chain beneath the bottom of the bar.
Tighten the two nuts holding the bar cover plate in place, without removing the supporting 2x4 block. Make sure both nuts are securely tightened. Remove the supporting block and spin the chain by hand--it should still have at least 1/8 inch of slack and should rotate freely.
If the chain is too tight, loosen the two cover plate screws, loosen the tensioning screw slightly and repeat the previous step.