Fg stands for foreground, and is used to bring a job to foreground in the shell. If a task is in foreground you of course cannot use the shell, and at best are interacting with the program, or are watching output.
hostname:~# fg 2
The above example would bring to the foreground which ever application was running in the "jobspec" of number 2.
To get a list of the current applications running you would us the jobs command. Each running application will have a job number or "jobspec" associated with it.