Database mirroring is the creation and maintenance of redundant copies of a database that involves two SQL Server instances on the same or different machines. One SQL Server instance acts as a primary instance called the principal, while the other is a mirrored instance called the mirror. There can be a third SQL Server instance that acts as a witness (special cases)
An Overview of Database Mirroring In SQL Server
It is highly recommend that you configure database mirroring during off-peak hours because configuration can impact performance. Before configuring database mirroring, take a full backup, transactional log backup on the principal server and restored it on the mirrored server with NORECOVERY option.
Take a look at this link
Configure SQL Server Database Mirroring: Step By Step ~ SQL Server Citation it will show you step by step method to method to configure database mirroring in SQL Server.