Sample Code:
Batch_Class_Name obj = new Batch_Class_Name();
Id batchId = Database.executeBatch();
AsyncApexJob job = [SELECT Id, Status, JobItemsProcessed, TotalJobItems, NumberOfErrors FROM AsyncApexJob WHERE ID =: batchId];
Cheers!!!