Idk how to lose weight


I recently gained some weight due to being laid up because of knee surgery. I currently weight 235 and I want to be 170. I’m 5’8 also. I know I need to diet but idk what to exactly eat. I want to start working out but I’m not sure what exercises to do. Can someone help???