Plotting
x = 0:0.1:2*pi;
y = sin(x);
plot(x, y)
xlabel('x')
ylabel('sin(x)')
title('A sine wave')
More than one curve
hold on
plot(x, cos(x))
legend('sin', 'cos')
hold off
hold on keeps the existing plot instead of clearing it when you plot again; legend labels each curve.
Why This Matters for Your Exams
Plotting a function alongside your computed answer is the fastest way to sanity-check it -- if a root-finding or optimization answer doesn't land where the graph says it should, you've made a mistake somewhere.

