I have never been on a train but love watching them.  I like to count how many train-cars are being pulled! 
It's so much different than cars because you're being guided by the tracks instead of on a prepared flat surface
I know!  They are so powerful and loud!  How fast can they go?
It depends on the type.  Power either comes from electrification system or they produce their own power, usually with diesel engines.
Where does the electricity come from?
From the railway electrification system.  Most tracks also have a signaling system.
What does the signaling system do?  Is it to alert cars?
I'm not sure.  The electrification system supplies electric power to the trains and trams without an on-board prime mover or fuel supply on board.
Is that more efficient than the use of self powered diesel engines?
Yes, the electricity is generated in very efficient generating stations, then transmitted to the railway networks and trains