Underline is yellow under wait which means that it is not an error but a warning. You can however over the wait to get more information about what is wrong. You can also open a Problems panel from Menu->View->Problems to get more information.
Most likely wait() method is deprecated in Mbed OS version you are using. What version do you use? You can find it by opening libraries panel. Menu->View->Mbed Libraries.
To get a program on the board you need to click the run button (it is located under the profile selection dropdown)