You can install Minecraft Forge for free from the Forge website, and then use it to download and enable mods.
Java Edition," you'll first need to download a free program called OptiFine.