This is a very general question with much answer space. The 'how' depends upon what app or apps are to be tested and what type of testing you are expected to do - unless you are truly testing a "mainframe", which can lead to all kinds of testing in the systems realm. Please supply more details. What are you tasked with? Are you a developer charged with testing at the unit or unit integration level? Are you testing functionality and/or testing whether an app behaves according to a functional specification? Again, please supply more details in order to get more help.
Again you have not supplied enough but usually when you test a mainframe you will either have a dedicated terminal or an emulator sitting on your PC that connects to the mainframe via a time shared session.
You will either test an appliaction or an application and the back-end database usually IBM DB2.
A mainframe session screen looks akin to the old DOS applications. With poor colour (compared to Windows) most times no colour.
If the front end app is windows or UNix based then you will probably drive the test by inputting data thru this app and then looking in the database (can use tools like FileAid from compuware, Abendaid and Hyperstation) to test back end e.g. for values written to database.
Testing is usually manual where you validate that certain values are set in a database or displayed in a mainframe application. You can automate but you will need a tool like the ones mentioned above.
You will write test cases as usually and expected results as usually.
To run tests you may need to run a batch file that processes the test run data (akin to overnight runs for say a banking process). You will need to speak to the mainframe operations team for that. If you are in a test environment they may show you how to write simple batch processing instructions so you can run your own jobs.
Hope this helps for now
"Oh yeah that's easy for you to say you've got a cool sounding name. How about we trade, OK? You're Mr. Pink." Mr Pink, Reservoir Dogs