Q:

How do functions work?

Except for in maths examples, of which there are many, I don't understand functions properly. 
What is wrong with this?
def get_address():
    address = raw_input ("What is your address: ")
    return address

I'm not able to get a variable address returned for use later.

A:

What you did, you failed to call the function that is why you facing this problem.
Use this instead and you can able to get the address of a function.
In Python v2.x
#!/usr/bin/python

def get_address():
        address = raw_input("What is your address: ")   
        return address

a = get_address()
print a 

What is raw_input? 
It ask the user (the optional arg of raw_input([arg])), gets input from the user and returns the data input by the user in a string.
In Python v3.x:
#!/usr/bin/python
name=input('Enter your name : ')
print ("Welcome %s, Let us be friends!" % name);

