Go to the official OptiFine website
Download the OptiFine version that matches your Minecraft version
Open the downloaded OptiFine `.jar` file
Click Install
Open the Minecraft Launcher
Select the OptiFine profile
Click Play
If needed, install the matching version of Minecraft first
