Default Media server communication

I know that there are several (quite a few) number of media streamer apps
on the playstore that allow you to stream videos and such from a server onto
the phone/tablet device.
I want to try and build one myself. But Im not exactly sure where to start and how
to go about doing it. Namely, I am unsure how to get a media server to talk with
an android client app.