You can achieve this by using sendkeys() or Robot class method. Locate the text box and set the file path using sendkeys() and click on submit button
Locate the browse button
WebElement browse =driver.findElement(By.id("uploadfile"));
Pass the path of the file to be uploaded using sendKeys method
browse.sendKeys("D:\\SeleniumInterview\\UploadFile.txt");