The answer is different depending on if you're replacing XML or Lua files. Since you're describing what sounds like just the XML files, I'll use Techs as an example.
Remember that all of the core game data is stored in a database, so that means there are two steps to a total replacement:
1. Remove all of the old data
2. Load all of the new data
I personally like to use SQL to do my bulk deletes, but others use the XML format. You will need to add an SQL file to your project, and your project's actions tab, add it with Event: OnModActivated, Action: UpdateDatabase. In the sql file itself, you will just need the following:
How do you know 'Technologies' is the name of the table to dump everything out of? Look at CivBETechnologies.xml in the core game files. You will also need to find the table names to remove things like affinities, extra perks, and other effects, as well as the connections between all of the techs.
Then to load, just write up your new XML file containing your new tech information. Follow the same format as the existing CivBETechnologies.xml
Hope this gives you a good start.