Do airline pilots get to go home to see their families often, and if so how long?
All in the contract, routes, and choices of the pilot within that contract. Some fly trips of up to two weeks, others are back home every night if they have a home near their base airport and work regional. Some choose to take all available work offered while others stay near the minimum.
Labor law limits total flying time per day and per week depending on crew size and time of the day.
Many companies allow bidding for trips, days off etc. Company, routes, seniority, equipment flown all enter the equation that results in the answer. As stated by others, some are home every night (flying turn-arounds) JFK-MIA-JFK as an example. Others prefer less commuting to the airport and will choose 2,3,4 day trips, overnighting at different cities each night until finished with the sequence of trips. Some jobs have trips that fly for 1-2 weeks at a time, not necessarily everyday but they are gone from base that long. Also where one lives relative to the base they work at will affect how often they are home with family.