PowerShell is an application developed by Microsoft that is open-source and cross-platform. It was originally related to Windows OS.
The earliest versions of PowerShell were included in Windows 7 and Windows Server 2008 R2 OS.
Before PowerShell appeared, Microsoft DOS and Windows operating systems relied on a command-line interpreter (CLI) that received different names over the time, like COMMAND.COM, cmd.exe, cmd or Command Prompt. Command Prompt is still available by default on current Windows versions, alongside PowerShell, as some users still use it.
Command Prompt had limited functionality, and users and administrator had to rely on the graphical user interface (GUI) to perform many operations and configurations. The purpose of PowerShell was to provide enough functionality to allow to configure the whole OS from a CLI.
PowerShell is based on other existing shells like the Unix shell Bash.
PowerShell is backward-compatible with Command Prompt through the uses of aliases that map the original Command Prompts commands with its equivalent in PowerShell. For example, if you type
dir in PowerShell it will map it to the PowerShell command
Later, PowerShell was expanded to other Unix-like operating systems like macOS, Ubuntu, Debian and many others.