Creating sub-domains or sub-directories

I’m looking for instructions on creating sub-domains or sub-directories with completely new WordPress installs.