Usually, to animate a sprite, you have to keep track of three things: time of course to handle animation speed, current animation (which can be the 'line' in an unoptimized sheet) and current frame in animation (which can be the 'column' in an unoptimized sheet).
Depending on your needs, you might also have a variable 'hotspot' which is the reference point from which the sprite will be drawn. This is useful especially for human character walk and run animations, to avoid 'sliding' effects.
Now, to actually draw your sprite, you want to draw only a region of your sprite sheet, which will be either computed (x = current frame * frame width, y = current animation * frame height), or stored in some data structure created by a tool.
Anyway, at this point, you should have a mapping from state (animation + frame) to a rectangle in your sheet. Depending on your technology stack, you might draw a clipped version of the image (GDI+, Java, etc...) or texture a quad with the proper UVs (OpenGL, ...), or use SpriteBatch with a source Rectangle (XNA).