Java is a programming language, development environment, and runtime environment. It uses a virtual machine to execute bytecode independently of hardware or operating systems. Key features include garbage collection, which frees memory automatically, and code security provided by the runtime environment through class loading, verification, and memory protection. A Java program goes through the phases of writing code, compiling to bytecode, and running within a virtual machine.