Windows Defender in 8.1 is a decent enough anti-virus and firewall, and isn’t a massive bloated hog like most AV products like McAfee, Norton and even I’ve found freebies like AVG and Avast were crippling my computer.
Windows Defender in older versions of windows was just anti spyware and they offered a separate AV product for download, but that’s gone and it’s all built into Windows 8.1 now (and I would assume will also be in 10).
At home you typically have a NAT router and this will act as a firewall both because of the nature of NAT and any decent router will have a built in firewall also. If the router offers it, make sure flood protection / denial of service / port scan features are turned on. Also some ISPs offer a firewall at their end you can turn on in your account settings (PlusNet do this).
Though in your case it sounds like a virus / malware app started up and opened a router port for a botnet to use. Hopefully you didn’t do any financial transactions online while it was doing this. Often they install key loggers and catch your passwords to banking sites etc.
Anyway, also worth turning off UPNP in the router as this allows any computer on your network to open a port on the router without your knowledge. It’s supposed to make it easier for when you need it, but it’s a danger with viruses and malware.