The only way to prevent both corruption and hallow from spreading around your house is to make a wall of clay or ash (or air) that is at least 4 blocks thick. There are other blocks that may stop the spread, like dungeon bricks or silver/gold bricks, but none of these have been confirmed, so use them at your own risk.
To do this, move away from your house a fair way (left or right) and start building a trench that's 4 blocks thick. Dig it as far down as you'd like (I'd suggest about 30 blocks or so, but any depth is fine) then begin digging a 4 block high tunnel towards your house, passing under, and continuing for as long as you just dug. Then dig upwards with a 4 wide tunnel until you reach the surface.
When your trench is done, fill it in with ash or clay (or at least fill the top of the trench sides in, so that you don't have to jump over the gap). I'd suggest ash because it's so much easier to harvest a large amount of it easily.
The way this works is because hallow and corruption can "jump" 3 blocks to hallow/corrupt any other blocks on the other side. Neither can spread through ash or clay or air though, so it won't be able to reach your house.
What you'll be left with is an "island" of sorts made of regular dirt and stone, surrounded by hallow and corruption. This will prevent harder monsters from spawning at least for a bit away from your house. Keep in mind though that the hallow and corruption will spread completely around you, including through your mining shaft if you built one under your house. It shouldn't spread up your shaft if you built the clay/ash through the shaft (minus the actual shaft of course), but you will have underground corruption/hallow underneath your house at whatever depth you decided to dig your clay wall down to.
With all of that said though, you should be safe from monster spawns if you have all the NPC's even if corrputon/hallow has spread all the way through your house, but harder mobs will start spawning much closer to your house when you stray away from your npcs. This can become a problem if there's corruption close by, as the corruptor's projectiles can convert blocks to corruption blocks. My advice is to build the island, and then plant hallowed seeds on either side of the island so that you don't have to worry about corruptors.
The best preparation for Plantera is a good battlefield. I usually hollow out a large area in the middle of the underground jungle, and put a row of platforms across it about every 10 blocks up. Make the area about 50 by 60 (large enough you can move around freely, but small enough you can have the whole thing on your screen at once), and put down a campfire in the middle of it. Leave a hole in the platforms on the sides so you can drop down quickly. Then when you fight plantera you can use your grappling hook to move quickly up and to the sides and stay out of its way. Be careful, and try to take as few hits as possible, and Hallowed armor should be enough.
For the weapon, use a repeater or a nice gun like the megashark with LOTS of good ammo to take it down. And of course make all the potions you can. Ironskin, well-fed, and swiftness at the very least.
For equipment, prioritize mobility, but keep your Obsidian shield handy so you don't get knocked around by tentacles. I also suggest one of those red rings made by combining a philosopher's stone and a band of regeneration for the reduced potion sickness time.
There are simpler ways to get it done. If you have a lot of gold you can set up teleporters at either end of a long hallway, then lure plantera to it. Teleport, then shoot plantera while it follows you to the other end of the hallway, and repeat. Laying down asphalt on the top and bottom of your boss fight area can also make it easier. (make asphalt with gel and stone at a blend-o-matic, bought from the steampunker)
Best Answer
3 things happen when you go to hard more:
To prep for stronger enemies/bosses, you should make sure you have top tier pre-hardmode weapons/armor/accessories and 400 max health. ie: Molten armor and a strong weapon like nights edge.
Getting a surface mushroom biome with a house for the Truffle NPC and then buying a mushroom spear as soon as he moves in after hardmode will make surviving much easier. The spear has decent knockback, good damage, and can hit enemies through walls.
You should get a Molten pickaxe to make Colbalt/Pallidium mining possible early on. quickly breaking Demon Alters and raising yourself to at least oricalcum armor quickly will make the common enemies much more bearable.
If you care about the lose of your natural biomes then the spread of corruption/hallow is a problem. You cannot control where it spawns but you can harvest the biomes blocks and create artificial biomes later on. However, I think waiting until you can get the Steampunker NPC and can buy the Clentaminator to remove hallow/corruption is a better use of time.