Yes—you can mix music at home. But the quality of the result depends on several factors:
Understanding the purpose of EQs, compressors, saturators, reverbs, and other tools, as well as having some knowledge of psychoacoustics—how humans perceive sound.
A properly treated room ensures you hear the mix accurately, without coloration from echoes or resonances. Untreated rooms distort the sound, making it impossible to judge properly.
At minimum: studio monitors (speakers), an audio interface, and high-quality headphones. This setup lets you hear details and make precise adjustments.
Perhaps the most important factor. Even with the best room and gear, experience is what allows engineers to judge what needs fixing and what doesn’t. It takes years of practice to develop this skill.
In short: if you want to learn mixing yourself, study the theory, prepare your space, get the right gear, and practice a lot. It will take years before your results approach professional standards.
If you don’t want to spend that much time, the better solution is to hire a professional mixing engineer.