I think I know what they are, I just want to make sure. Plus this may help others!!!
A function is a chunk of code that you encase that will only run when called on. for instace
--this is how you make a function with the name 'printSomeLines' function printSomeLines() print('hello') print('World') end
The code in this function will only run if the function is called upon like so
--since we already created the function above doing this will run all of the code inside of it printSomeLines()
Alot of events in this game allow you to connect a function to it when they trigger like
--This connected function will run whenever the button is clicked button.ClickDetector.MouseClick:Connect(printSomeLines)
However, you dont have to create your own function and call it, you can make an anonymous function and put it in the event like so
button.ClickDetector.MouseClick:Connect(function() print('Hello') print('World') end)