you have a type 188 diff, also know as the medium diff. its called a 188, because that is the diameter in mm of the ring gear. unless you know the proper preload specs for the carrier and pinion bearings, and know how to set pinion backlash and depth, then you'll want a whole new diff. i can provide you with the specs for rebuilding the diff if you'd like.
as for what fits, there are lots of diffs that bolt on. any e30 diff besides the 318i,is will bolt up. various 5 and 7 series diffs will fit by changing the diff cover and flanges over to your stock pieces. also some z3 diffs will fit.
any type 188 diff ring and pinion will fit in, so that's like over 1/2 of the bmws made since the 80s.
as to telling what you have, or what a diff is that you find in a junkyard. there should be a tag bolted to the diff cover. if the first digit is an 'S', then its a limited slip unit. the next 3 numbers, or the first 3 numbers if there is no 'S' is the ratio. so it it says S293, its a limited slip with a 2.93 r&p ratio, if it says 373, then its an open diff with a 3.73 ratio. limited slip units will also have a big 'S' on the top of the diff.
if the tag is missing, unreadable, or you don't trust it there are two ways to figure out the ratio. 1. do as starmarvin suggested, count the teeth on the ring gear and the pinion shaft, divide one into the other and you'll have your ratio. 2. an easier, but less exact way is to raise the car up in the back and mark the pinion flange, where the driveshaft bolts to the diff. count how many times the flange rotates when you rotate the tires once. you can then match this up to the available ratios for the car, so if it looks like it rotated just a hair under 4 times, then if its and e30 it would be a 3.91 ratio. also note that if both tires rotate in the same direction, then its an lsd