How to output only the overlapping region of two files?
bedtools is my go-to program for operations on genomic intervals. In particular, the bedtools intersect operation is what you're looking for here.

$ cat fileA
chr1    25      50
chr1    75      200
$ cat fileB
chr1    10      60
chr1    80      90
$ bedtools intersect -a fileA -b fileB                                                           
chr1    25      50
chr1    80      90


Make sure that the values are separated by tabs rather than spaces, or bedtools will have trouble reading the files.