The Media Foundation SimplePlay sample guestgulkan mentions is one of a number of ways.
SimplePlay Sample (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd757926%28v=vs.85%29.aspx
But note that while the MFPlay API it uses only came in with Windows 7, it's already marked as deprecated. SimplePlay is, however, easier to follow that the latest, preferred (by Microsoft) approach which can be found here:
Media Session Playback Example
http://msdn.microsoft.com/en-us/library/ff728866%28v=vs.85%29.aspx
Another Media Foundation player, which works on Windows Vista and newer is this:
MFPlayer Sample (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/bb970516%28v=vs.85%29.aspx
But an alternative approach is to embed (or just launch) a player. e.g. the Window Media Player control or possibly VLC Player (I've only played with the latter.)
Your opening post doesn't specify
how you want to play the AVI file?
A
nd
y
PS The same set of documentation also explains the older DirectShow approach (about since the mid-90s, but which is still used by apps that need to support older versions of Windows) and, much deeper down, the ancient Video for Windows approach (which started off life in the Win16 days).