If you just have one good in your utility function, then you really dont need an indifference curve. The reason we use IC is because we cant draw 3-D graphs properly without a computer (Remember $U(x,y)$ requires 3 axes to plot: X-axis, Y-axis, and a Z-axis to plot the values of U). So indifference curve (which basically draws the contours of the utility function) provides an easy illustration.
Given this caveat, lets plot the IC of $U(x,y) = f(x)$. The right way to think about this is that good $Y$ is available, but the consumer does not derive any utility from it.
Recall the definition of an indifference curve:
An indifference curve curve with utility level $k$ is the set of all bundles $(x,y)$ such that $U(x,y)=k$.
In our case, suppose $(x^*,0)$ provides the utility level $k$: $U(x^*,0)=f(x^*)=k$. What other bundles give the same utility? Note that you can change $y$ and still receive utility $k$: $U(x^*,0)=U(x^*,1)=.....=k$ and so on. Thus the IC that yields utility $k$ is a vertical line (parallel to the Y-axis).
Assuming that $f(x)$ is increasing, vertical lines towards the right correspond to higher utility levels (obvious, since the value of $x$ increases as we move right).
You can now easily verify that the optimal bundle should be $x^*=\frac{m}{p}$. Draw the vertical IC. Draw the downward sloping budget line. Since higher utility is achieved by moving right, keep moving till you reach the extreme right point of your budget set - this is exactly the point $(\frac{m}{p},0)$.