The following code implements Euler's method with f(t,y), t0, y0, and tf as inputs.  The output is a list of (t,y) pairs.  We can display this as a table or a plot.

f[t_, y_] :=  y; 
t0 = 0. ;
y0 = 1. ;
tf = 5;
n = 100;
h = (tf - t0)/n;
tylist = {{t0, y0}};
Do[
tylist = 
        Append[tylist, {t + h, 
            tylist[[-1, 2]] + h*f[t, tylist[[-1, 2]]]}], {t, 
        t0, tf - h, h}]

tylist // TableForm

approxsolnplot = ListPlot[tylist, PlotRange -> All]

The exact solution to this initial-value problem is the exponential function so we can plot the approximation against the exact solution for comparison.

solnplot = Plot[Exp[t], {t, 0, 5}]

Show[approxsolnplot, solnplot]

Here's the algorthim for a different initial value problem.

f[t_, y_] := t -  y;
t0 = 0. ;
y0 = 1. ;
tf = 5;
n = 100;
h = (tf - t0)/n;
tylist = {{t0, y0}};
Do[
tylist = 
        Append[tylist, {t + h, 
            tylist[[-1, 2]] + h*f[t, tylist[[-1, 2]]]}], {t, 
        t0, tf - h, h}]

ListPlot[tylist, PlotRange -> All]

Running the algorithm on the next example generates some problems.

f[t_, y_] := y^2;
t0 = 0. ;
y0 = 1. ;
tf = 5;
n = 100;
h = (tf - t0)/n;
tylist = {{t0, y0}};
Do[
tylist = 
        Append[tylist, {t + h, 
            tylist[[-1, 2]] + h*f[t, tylist[[-1, 2]]]}], {t, 
        t0, tf - h, h}]

ListPlot[tylist, PlotRange -> All]

Changing tf to 1 reveals what appears to be the problem: The solution has an asymptote at t=1.  In this case, we can confirm the existence of the asymptote since we can solve the equation analytically.  We'll have to keep our eyes open for this in other cases.

f[t_, y_] := y^2;
t0 = 0. ;
y0 = 1. ;
tf = 1;
n = 100;
h = (tf - t0)/n;
tylist = {{t0, y0}};
Do[
tylist = 
        Append[tylist, {t + h, 
            tylist[[-1, 2]] + h*f[t, tylist[[-1, 2]]]}], {t, 
        t0, tf - h, h}]

ListPlot[tylist, PlotRange -> All]