What device is used for a Domain Controller?
Solution 1:
As here already mentioned, you can run Domain controller either on baremetal or as VM. I prefer VM, as it gives you more flexibility and as DC require “low” CPU and RAM you don’t waste hardware resources of modern servers.
AD infrastructure should be redundant, and it means that at least two DC must be deployed on different hardware servers. Failover Cluster is not required, as AD has built-in high availability (if designed correctly).
AD role can be installed using wizard or PowerShell commands. Don’t mix other roles (like Hyper-V, File Server, etc) with AD on the same Windows instances, because it can cause issues, more explanation here - https://www.hyper-v.io/combining-hyper-v-dc-role-server-bad-idea/
I’d suggest to start with reading Microsoft best practices and hardware recommendation: https://docs.microsoft.com/en-us/windows-server/administration/performance-tuning/role/active-directory-server/hardware-considerations https://social.technet.microsoft.com/wiki/contents/articles/52587.active-directory-design-considerations-and-best-practices.aspx
Solution 2:
Answer
You do not need server racks. You need a computer to install Windows Server on. Once you have installed the operating system you install Active Directory onto that server. Your question requires too much explanation regarding Active Directory. You are essentially asking for the documentation regarding how to do a multi-site setup. Install it to a single server first and then build upon that knowledge by going to docs.microsoft.com and doing some research/reading. I've put some basic installation directions for you below without explaining why. It's too much verbiage.
Basics
A Windows Domain Controller runs on Windows Server. It is a feature that the server can have installed/enabled.
To view all of the possible roles you can open a Windows Administrative Powershell session and type the following command
Get-WindowsFeature
A list of the available features will scroll by. One of them is "Active Directory Domain Services". You can initiate an install of Active Directory by using the 'Install-WindowsFeature' Powershell cmdlet.
Type the following command into your administrative powershell cli:
Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools -Verbose
This will initiate the installation of Active Directory and make the server a domain controller. This role is central to idea of a centralized security context for all of your workstations, servers and users as well as other LDAP objects that you can act upon and manage.
Once the installation is complete you can view the available tools to manage your server's domains services by opening the administrative tools section in your start menu.
I suggest you read the manual by following this link and seeing the other methods of deploying Active Directory to a Windows Server as well as researching what Active Directory is and what it is used for.
Solution 3:
If you were tasked with setting up an AD infrastructure for multiple sites you should probably learn a bit more about the architecture than you will from random strangers on a tech forum.
But to give you a meaningful answer: Pretty much any physical or virtual server capable of running a supported version of Windows Server should be capable of also running the required AD DS and DNS roles in a small environment. As capacity requirements increase, so do of course the performance ones. But if you're setting up a lab to learn a bit, you should be perfectly fine with a core or two of a modern x64 CPU, a gigabyte or so of RAM, and 60-100 gigabytes of disk space.