OK, from my research, and the other answers, this are the steps you have to take to change your cassette:
Determine if you have a freewheel or a cassette? This is a distinction that I initially ignored. It is important because you need different tools to remove and install these, so be careful.
Find your derailleur model, it is usually engraved in the back of it (mine is a Shimano Tourney RD-A070) and google the maximum sprocket that it supports. For my derailleur, it was a 28 teeth gear, but I managed to make it work with a 34t. As always, manufacturer specifications are a little conservative.
Adjust the b-screw in your rear derailleur: here is a How-to tutorial
. Doing this you'll be able to adjust it for a bigger sprocket.
Using the model of your derailleur, google its capacity. The capacity is the difference in teeth from the gear in which the chain is loosest (the smaller chainring and the smaller rear sprocket) to that in which it is tightest (the biggest chainring and the biggest rear sprocket).
If the capacity of your rear derailleur is lower than your actual capacity, I think you can solve this problem by avoiding ever cross-chaining.
This is what I have been able to come up from zero knowledge about this, so, please, correct me if I am wrong in any of the above.