For mirroring to make sense, you'll need at least a second instance of SQL-Server: One for the "principal" and one for the "mirror".
How to install a further instance, see: Instance configuration.
For automatic failover to take effect, you'll also need a third instance (the "Witness"), which purpose is to monitor the principal's and mirror's (connection)states ("... the witness does not serve the database. Supporting automatic failover is the only role of the witness").
To setup the whole mirror with failover see: Automatic failover and Synchronous Database Mirroring (High-Safety Mode).
Once completed the steps, you can test your configuration by stopping one of the SQL-Server services (principal or mirror). The mirrored database gets available then.
I strongly suggest not to run the instances on the same, real server since this will not secure you from any hardware-disasters!