To do this with python you need to create some variables first so you can call the selection and with the arcpy.CopyFeatures tool copy the selection to a new feature class.
# Define output feature class location
fc = "C:\Users\Documents\ArcGIS\Default.gdb\Testers"
# Define Selection criteria
Selection = arcpy.SelectLayerByLocation_management('Points', "WITHIN", 'Trajectory')
# Define output selection and fc
This example was used within the Python interpreter in ArcMap. You can see that by using variables it makes everything easier to use and understand.
The example you provide should be something like this:
#Set geoprocessing environments
arcpy.env.workspace = "C:/Student/PythonBasics10_0/Westerville.gdb"
arcpy.env.overwriteOutput = True
# Set name of output fc and select buildings by location
Outputfc = "BuildingsWithin50ft"
Selection = arcpy.SelectLayerByLocation_management("Buildings", "WITHIN_A_DISTANCE", "Hydrography", "50 feet", "NEW_SELECTION","NOT_INVERT")