Pregunta de entrevista de QID

What are the differences between stored procedure and function?