for easy installations get Magic Launcher
Windows/Linux Instructions:
Locate your minecraft.jar file. On Windows, it’s in %APPDATA%/.minecraft/bin
Create a backup of minecraft.jar
Open minecraft.jar in an archive editor (WinRar/7-Zip/etc)
Delete the META-INF folder.
Copy the .class files from the downloaded zip file into the jar file, replacing previous files.
Run Minecraft and test!
OptiFine 1.4.7 Mod Mac Instructions:
Locate your minecraft.jar file. On Mac, it’s in/Library/Application Support/minecraft/bin
Create a backup of minecraft.jar
rename minecraft.jar to minecraft.zip and double-click it to extract the contents
rename the resulting folder to minecraft.jar and open it
copy the .class files from the downloaded zip into the minecraft.jar folder, replacing previous files
Run Minecraft and test!
Download: OptiFine HD Mod 1.4.7