Hi Hemant, you can use driver.switch_to.frame method to switch to a frame on a webpage using ruby selenium webdriver. This method takes frame's id or name or any other identifier and switch the focus from window to frame. Checkout following commands to understand better:
driver.switch_to.frame "#frameId" # id of frame
driver.switch_to.frame driver.find_element(id: '#frameId') # frame element
driver.switch_to.default_content # default_content to switch back to default window