Great question! I know there are times when changes need to be made in your books to reflect new ways of managing your business data or even to correct errors. There are a couple things you could mean with the term "categories," so I'll go over both to make sure you're able to take care of this.
The first thing you may be referring to are the accounts that you choose from the Category column on expenses. These are linked to expense accounts in your chart of accounts.
The second thing you might be referring to are the categories that can be assigned to products and services to help you organize them in your inventory list.
I'm happy to report that in both cases, it's possible to update or change the names of these categories or accounts without negatively affecting your transactions. What QuickBooks Online will do is update the details on the transactions for you and apply these changes moving forward with new transactions as well. It's pretty easy!