You put PHP code in PHP files (these usually have a .php extension)
PHP can be used to output HTML, so outside of your PHP tags, you can write HTML which the web server will just send to the browser.
However, this forum isn't here to write your code for you, so the example you asked for will just have to be Googled by yourself.