Remote functions provide a means for server and client to send messages back and forth. The remote event lets the client sent a one way message to the server. The remote function however lets the client send a message to the server and the server to return a value back to the client. If you want more detail check out the link above to read about remote functions and events in the Roblox API.
In the cheeky video example we provide the player with a button on the screen that says get a surprise. When they click the button the remote function triggers a function on the server to create a large brick part above them that falls on their head, and then returns the message “did you like your surprise ;)”. This is a very simple example of returning values using remote functions.
To learn more useful ways to use remote functions check out one of my courses using the links below to get the best price on Udemy or Skillshare.