Test.getStandardPricebookId() is used to get or fetch the Standard Price Book Id in the Apex test class.
Sample Code:
Id pricebookId = Test.getStandardPricebookId();
Sample Apex Test Class:
@isTest
private class ProductTestClass {
static testMethod void testPriceBook() {
Id pricebookId = Test.getStandardPricebookId();
Assert.isNotNull( pricebookId );
}
}