Like C, C++ code must be compiled before it runs. The same major compilers support both languages: g++ (GCC's C++ frontend), clang++, and MSVC.
# Linux (Debian/Ubuntu)
sudo apt update && sudo apt install build-essential
# macOS
xcode-select --install # installs clang++
# Windows — either WSL (then follow Linux steps) or MinGW-w64 for a native g++
g++ --version # verify installation
For an editor, VS Code with the "C/C++" extension works well for both C and C++; CLion is a popular full IDE built specifically around CMake-based C++ projects. cppreference.com is the standard, authoritative reference for the language and standard library — worth bookmarking from day one.
Compiling and running is the same pattern as C, just with a different file extension and standard flag:
g++ -std=c++20 -Wall -Wextra -o app main.cpp
./app
-std=c++20 targets the C++20 standard; use -std=c++17 if your compiler is older, since C++20 support varies more than C++17 across compiler versions. As with C, always compile with -Wall -Wextra enabled — C++'s stronger type system catches even more classes of mistakes at compile time than C does, but only if warnings are turned on.